Skip to content

Instantly share code, notes, and snippets.

@oten
Last active August 29, 2015 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oten/112c2a7ceb30152ffb4c to your computer and use it in GitHub Desktop.
Save oten/112c2a7ceb30152ffb4c to your computer and use it in GitHub Desktop.
diff --git a/src/arch/util/mempool.c b/src/arch/util/mempool.c
index e0778b9..2b068f3 100644
--- a/src/arch/util/mempool.c
+++ b/src/arch/util/mempool.c
@@ -30,7 +30,7 @@ Heavily modified by Nikhil Jain 11/28/2011
#endif
#include "mempool.h"
-int cutOffPoints[] = {64,128,256,512,1024,2048,4096, 8192,16384,32768,
+size_t cutOffPoints[] = {64,128,256,512,1024,2048,4096, 8192,16384,32768,
65536,131072,262144,524288,1048576,2097152,4194304,
8388608,16777216,33554432,67108864,134217728,268435456,
536870912,1073741824};
diff --git a/src/conv-core/isomalloc.c b/src/conv-core/isomalloc.c
index 855c763..4cea50a 100644
--- a/src/conv-core/isomalloc.c
+++ b/src/conv-core/isomalloc.c
@@ -62,7 +62,7 @@ added by Ryan Mokos in July 2008.
#if CMK_USE_MEMPOOL_ISOMALLOC
#include "mempool.h"
-extern int cutOffPoints[cutOffNum];
+extern size_t cutOffPoints[cutOffNum];
#endif
static int _sync_iso = 0;
@@ -2652,7 +2652,7 @@ void CmiIsomallocBlockListPup(pup_er p,CmiIsomallocBlockList **lp, CthThread tid
currSlot = (slot_header*)((char*)current+sizeof(block_header));
}
while(currSlot != NULL) {
- pup_int(p,&cutOffPoints[currSlot->size]);
+ pup_ulong(p,&cutOffPoints[currSlot->size]);
if(MEMPOOL_GetSlotStatus(currSlot)) {
pup_int(p,&flags[0]);
pup_bytes(p,(void*)currSlot,sizeof(slot_header));
diff --git a/src/conv-core/isomalloc.c b/src/conv-core/isomalloc.c
index 855c763..af61576 100644
--- a/src/conv-core/isomalloc.c
+++ b/src/conv-core/isomalloc.c
@@ -2803,5 +2803,15 @@ static void print_myslots(){
print_slots(CpvAccess(myss));
}
-
+void
+__cyg_profile_func_enter (void *func, void *caller)
+{
+ fprintf(stderr, "e %p %p \n", func, caller);
+}
+
+void
+__cyg_profile_func_exit (void *func, void *caller)
+{
+ fprintf(stderr, "x %p %p \n", func, caller);
+}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment