annotate 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
rev   line source
Me@50 1 /*
Me@50 2 * Copyright 2009 OpenSourceCodeStewardshipFoundation.org
Me@50 3 * Licensed under GNU General Public License version 2
Me@50 4 *
Me@50 5 * Author: seanhalle@yahoo.com
Me@50 6 *
Me@50 7 * Created on November 14, 2009, 9:07 PM
Me@50 8 */
Me@50 9
Me@65 10 #ifndef _VMALLOC_H
Me@65 11 #define _VMALLOC_H
Me@65 12
Me@50 13 #include <malloc.h>
msach@76 14 #include <inttypes.h>
Me@50 15 #include "VMS_primitive_data_types.h"
Me@50 16
Me@50 17 typedef struct _MallocProlog MallocProlog;
Me@50 18
Me@50 19 struct _MallocProlog
Me@50 20 {
Me@50 21 MallocProlog *nextChunkInFreeList;
Me@50 22 MallocProlog *prevChunkInFreeList;
Me@50 23 MallocProlog *nextHigherInMem;
Me@50 24 MallocProlog *nextLowerInMem;
Me@50 25 };
Me@50 26 //MallocProlog
Me@50 27
Me@50 28 typedef struct
Me@50 29 {
Me@50 30 MallocProlog *firstChunkInFreeList;
msach@76 31 int32 numInList; //TODO not used
Me@50 32 }
Me@50 33 FreeListHead;
Me@50 34
Me@50 35 void *
msach@76 36 VMS__malloc( size_t sizeRequested );
Me@50 37
Me@50 38 void
Me@50 39 VMS__free( void *ptrToFree );
Me@50 40
Me@53 41 /*Allocates memory from the external system -- higher overhead
Me@53 42 */
Me@53 43 void *
msach@76 44 VMS__malloc_in_ext( size_t sizeRequested );
Me@53 45
Me@53 46 /*Frees memory that was allocated in the external system -- higher overhead
Me@53 47 */
Me@53 48 void
Me@53 49 VMS__free_in_ext( void *ptrToFree );
Me@53 50
Me@53 51
Me@50 52 MallocProlog *
Me@53 53 VMS_ext__create_free_list();
Me@50 54
Me@50 55 void
Me@50 56 VMS_ext__free_free_list( MallocProlog *freeListHead );
Me@65 57
Me@65 58 #endif