Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
diff vmalloc.h @ 61:984f7d78bfdf
Merge See what happens -- merged test stuff into Nov 8 VMS version
| author | SeanHalle |
|---|---|
| date | Thu, 11 Nov 2010 06:19:51 -0800 |
| parents | 8f7141a9272e |
| children | 13b22ffb8a2f |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/vmalloc.h Thu Nov 11 06:19:51 2010 -0800 1.3 @@ -0,0 +1,52 @@ 1.4 +/* 1.5 + * Copyright 2009 OpenSourceCodeStewardshipFoundation.org 1.6 + * Licensed under GNU General Public License version 2 1.7 + * 1.8 + * Author: seanhalle@yahoo.com 1.9 + * 1.10 + * Created on November 14, 2009, 9:07 PM 1.11 + */ 1.12 + 1.13 +#include <malloc.h> 1.14 +#include "VMS_primitive_data_types.h" 1.15 + 1.16 +typedef struct _MallocProlog MallocProlog; 1.17 + 1.18 +struct _MallocProlog 1.19 + { 1.20 + MallocProlog *nextChunkInFreeList; 1.21 + MallocProlog *prevChunkInFreeList; 1.22 + MallocProlog *nextHigherInMem; 1.23 + MallocProlog *nextLowerInMem; 1.24 + }; 1.25 +//MallocProlog 1.26 + 1.27 +typedef struct 1.28 + { 1.29 + MallocProlog *firstChunkInFreeList; 1.30 + int32 numInList; 1.31 + } 1.32 +FreeListHead; 1.33 + 1.34 +void * 1.35 +VMS__malloc( int32 sizeRequested ); 1.36 + 1.37 +void 1.38 +VMS__free( void *ptrToFree ); 1.39 + 1.40 +/*Allocates memory from the external system -- higher overhead 1.41 + */ 1.42 +void * 1.43 +VMS__malloc_in_ext( int32 sizeRequested ); 1.44 + 1.45 +/*Frees memory that was allocated in the external system -- higher overhead 1.46 + */ 1.47 +void 1.48 +VMS__free_in_ext( void *ptrToFree ); 1.49 + 1.50 + 1.51 +MallocProlog * 1.52 +VMS_ext__create_free_list(); 1.53 + 1.54 +void 1.55 +VMS_ext__free_free_list( MallocProlog *freeListHead );
