comparison vmalloc.h @ 66:bf08108405cc

Added recycle pool -- will merge later -- need to get PLDI results for now
author Me
date Mon, 15 Nov 2010 12:11:24 -0800
parents 13b22ffb8a2f
children
comparison
equal deleted inserted replaced
2:7c1700db72ea 3:169c542cc8c7
29 MallocProlog *firstChunkInFreeList; 29 MallocProlog *firstChunkInFreeList;
30 int32 numInList; 30 int32 numInList;
31 } 31 }
32 FreeListHead; 32 FreeListHead;
33 33
34 typedef struct
35 {
36 int32 hasNewStructs;
37 int32 sizeOfStructs;
38 int32 currArraySize;
39 void **arrays;
40 PrivDynArrayInfo *arraysInfo;
41 char *ptrToNextStruct;
42 char *ptrToTopOfCurrArray;
43 PrivQueueStruc *recycleQ;
44 }
45 VMSRecyclePool;
46
34 void * 47 void *
35 VMS__malloc( int32 sizeRequested ); 48 VMS__malloc( int32 sizeRequested );
36 49
37 void 50 void
38 VMS__free( void *ptrToFree ); 51 VMS__free( void *ptrToFree );
52 VMS_ext__create_free_list(); 65 VMS_ext__create_free_list();
53 66
54 void 67 void
55 VMS_ext__free_free_list( MallocProlog *freeListHead ); 68 VMS_ext__free_free_list( MallocProlog *freeListHead );
56 69
70 //==========================================================================
71
72 VMSRecyclePool *
73 VMS__make_recycle_pool( int32 sizeOfStructsToHold );
74
75 void *
76 VMS__get_from_recycle_pool( VMSRecyclePool *pool );
77
78 void
79 VMS__recycle( void *chunkToRecycle, VMSRecyclePool *pool );
80
81 void
82 VMS__free_recycle_pool( VMSRecyclePool *pool );
83
57 #endif 84 #endif