Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
view vmalloc.h @ 108:3bc3b89630c7
perf counters
| author | engelhardt@cray1 |
|---|---|
| date | Tue, 26 Jul 2011 15:36:24 +0200 |
| parents | 9ddbb071142d |
| children | ca154ebe2b6c dbfc8382d546 c11b9dcf6d24 |
line source
1 /*
2 * Copyright 2009 OpenSourceCodeStewardshipFoundation.org
3 * Licensed under GNU General Public License version 2
4 *
5 * Author: seanhalle@yahoo.com
6 *
7 * Created on November 14, 2009, 9:07 PM
8 */
10 #ifndef _VMALLOC_H
11 #define _VMALLOC_H
13 #include <malloc.h>
14 #include <inttypes.h>
15 #include "VMS_primitive_data_types.h"
17 typedef struct _MallocProlog MallocProlog;
19 struct _MallocProlog
20 {
21 MallocProlog *nextChunkInFreeList;
22 MallocProlog *prevChunkInFreeList;
23 MallocProlog *nextHigherInMem;
24 MallocProlog *nextLowerInMem;
25 };
26 //MallocProlog
28 typedef struct
29 {
30 MallocProlog *firstChunkInFreeList;
31 int32 numInList; //TODO not used
32 }
33 FreeListHead;
35 void *
36 VMS__malloc( size_t sizeRequested );
38 void *
39 VMS__malloc_aligned( size_t sizeRequested );
41 void
42 VMS__free( void *ptrToFree );
44 /*Allocates memory from the external system -- higher overhead
45 */
46 void *
47 VMS__malloc_in_ext( size_t sizeRequested );
49 /*Frees memory that was allocated in the external system -- higher overhead
50 */
51 void
52 VMS__free_in_ext( void *ptrToFree );
55 MallocProlog *
56 VMS_ext__create_free_list();
58 void
59 VMS_ext__free_free_list( MallocProlog *freeListHead );
61 #endif
