Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
comparison vmalloc.h @ 76:9ddbb071142d
make hardware independent and port to 64bit
| author | Merten Sach <msach@mailbox.tu-berlin.de> |
|---|---|
| date | Thu, 16 Jun 2011 14:41:15 +0200 |
| parents | 13b22ffb8a2f |
| children | 521c75d64cef |
comparison
equal
deleted
inserted
replaced
| 2:7c1700db72ea | 4:12a7d7c3ad04 |
|---|---|
| 9 | 9 |
| 10 #ifndef _VMALLOC_H | 10 #ifndef _VMALLOC_H |
| 11 #define _VMALLOC_H | 11 #define _VMALLOC_H |
| 12 | 12 |
| 13 #include <malloc.h> | 13 #include <malloc.h> |
| 14 #include <inttypes.h> | |
| 14 #include "VMS_primitive_data_types.h" | 15 #include "VMS_primitive_data_types.h" |
| 15 | 16 |
| 16 typedef struct _MallocProlog MallocProlog; | 17 typedef struct _MallocProlog MallocProlog; |
| 17 | 18 |
| 18 struct _MallocProlog | 19 struct _MallocProlog |
| 25 //MallocProlog | 26 //MallocProlog |
| 26 | 27 |
| 27 typedef struct | 28 typedef struct |
| 28 { | 29 { |
| 29 MallocProlog *firstChunkInFreeList; | 30 MallocProlog *firstChunkInFreeList; |
| 30 int32 numInList; | 31 int32 numInList; //TODO not used |
| 31 } | 32 } |
| 32 FreeListHead; | 33 FreeListHead; |
| 33 | 34 |
| 34 void * | 35 void * |
| 35 VMS__malloc( int32 sizeRequested ); | 36 VMS__malloc( size_t sizeRequested ); |
| 36 | 37 |
| 37 void | 38 void |
| 38 VMS__free( void *ptrToFree ); | 39 VMS__free( void *ptrToFree ); |
| 39 | 40 |
| 40 /*Allocates memory from the external system -- higher overhead | 41 /*Allocates memory from the external system -- higher overhead |
| 41 */ | 42 */ |
| 42 void * | 43 void * |
| 43 VMS__malloc_in_ext( int32 sizeRequested ); | 44 VMS__malloc_in_ext( size_t sizeRequested ); |
| 44 | 45 |
| 45 /*Frees memory that was allocated in the external system -- higher overhead | 46 /*Frees memory that was allocated in the external system -- higher overhead |
| 46 */ | 47 */ |
| 47 void | 48 void |
| 48 VMS__free_in_ext( void *ptrToFree ); | 49 VMS__free_in_ext( void *ptrToFree ); |
