Me@50: /* Me@50: * Copyright 2009 OpenSourceCodeStewardshipFoundation.org Me@50: * Licensed under GNU General Public License version 2 Me@50: * Me@50: * Author: seanhalle@yahoo.com Me@50: * Me@50: * Created on November 14, 2009, 9:07 PM Me@50: */ Me@50: Me@65: #ifndef _VMALLOC_H Me@65: #define _VMALLOC_H Me@65: Me@50: #include Me@50: #include "VMS_primitive_data_types.h" Me@50: Me@50: typedef struct _MallocProlog MallocProlog; Me@50: Me@50: struct _MallocProlog Me@50: { Me@50: MallocProlog *nextChunkInFreeList; Me@50: MallocProlog *prevChunkInFreeList; Me@50: MallocProlog *nextHigherInMem; Me@50: MallocProlog *nextLowerInMem; Me@50: }; Me@50: //MallocProlog Me@50: Me@50: typedef struct Me@50: { Me@50: MallocProlog *firstChunkInFreeList; Me@50: int32 numInList; Me@50: } Me@50: FreeListHead; Me@50: Me@50: void * Me@50: VMS__malloc( int32 sizeRequested ); Me@50: Me@50: void Me@50: VMS__free( void *ptrToFree ); Me@50: Me@53: /*Allocates memory from the external system -- higher overhead Me@53: */ Me@53: void * Me@53: VMS__malloc_in_ext( int32 sizeRequested ); Me@53: Me@53: /*Frees memory that was allocated in the external system -- higher overhead Me@53: */ Me@53: void Me@53: VMS__free_in_ext( void *ptrToFree ); Me@53: Me@53: Me@50: MallocProlog * Me@53: VMS_ext__create_free_list(); Me@50: Me@50: void Me@50: VMS_ext__free_free_list( MallocProlog *freeListHead ); Me@65: Me@65: #endif