view vmalloc.h @ 70:f9b60012fd74

working ucontext version
author Merten Sach <msach@mailbox.tu-berlin.de>
date Fri, 27 May 2011 12:35:40 +0200
parents 42dd44df1bb0
children bf08108405cc 9ddbb071142d a49f02980151
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 "VMS_primitive_data_types.h"
16 typedef struct _MallocProlog MallocProlog;
18 struct _MallocProlog
19 {
20 MallocProlog *nextChunkInFreeList;
21 MallocProlog *prevChunkInFreeList;
22 MallocProlog *nextHigherInMem;
23 MallocProlog *nextLowerInMem;
24 };
25 //MallocProlog
27 typedef struct
28 {
29 MallocProlog *firstChunkInFreeList;
30 int32 numInList;
31 }
32 FreeListHead;
34 void *
35 VMS__malloc( int32 sizeRequested );
37 void
38 VMS__free( void *ptrToFree );
40 /*Allocates memory from the external system -- higher overhead
41 */
42 void *
43 VMS__malloc_in_ext( int32 sizeRequested );
45 /*Frees memory that was allocated in the external system -- higher overhead
46 */
47 void
48 VMS__free_in_ext( void *ptrToFree );
51 MallocProlog *
52 VMS_ext__create_free_list();
54 void
55 VMS_ext__free_free_list( MallocProlog *freeListHead );
57 #endif