annotate vmalloc.h @ 135:0b49fd35afc1

distributed free working -app sends a VMSSemReqst to his Master which send a request to a different Master -Master send the request directly -The request structure is freed by the sender, when the request was handled There are still problems on shutdown. The shutdownVPs are all allocated by one Master which is likly to be terminated
author Merten Sach <msach@mailbox.tu-berlin.de>
date Fri, 16 Sep 2011 20:08:28 +0200
parents a9b72021f053
children 99798e4438a6
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@65 9 #ifndef _VMALLOC_H
Me@65 10 #define _VMALLOC_H
Me@65 11
Me@50 12 #include <malloc.h>
msach@76 13 #include <inttypes.h>
Me@50 14 #include "VMS_primitive_data_types.h"
msach@132 15 #include "ProcrContext.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;
msach@132 25 };
Me@50 26 //MallocProlog
msach@132 27
msach@132 28 typedef struct
msach@132 29 {
msach@132 30 uintptr_t procrID;
msach@132 31 MallocProlog *prevChunkInFreeList;
msach@132 32 MallocProlog *nextHigherInMem;
msach@132 33 MallocProlog *nextLowerInMem;
msach@132 34 } MallocPrologAllocated;
Me@50 35
Me@50 36 typedef struct
Me@50 37 {
Me@50 38 MallocProlog *firstChunkInFreeList;
msach@76 39 int32 numInList; //TODO not used
msach@132 40 } FreeListHead;
Me@50 41
Me@50 42 void *
msach@132 43 VMS__malloc_on_core(size_t sizeRequested, int procrID);
Me@50 44
msach@78 45 void *
msach@132 46 VMS__malloc(size_t sizeRequested);
msach@132 47
msach@132 48 void *
msach@132 49 VMS__malloc_in_lib(size_t sizeRequested, VirtProcr *VProc);
msach@78 50
Me@50 51 void
Me@50 52 VMS__free( void *ptrToFree );
Me@50 53
msach@132 54 void
msach@132 55 VMS__free_in_lib(void *ptrToFree, VirtProcr *VProc);
msach@132 56
msach@132 57 void
msach@132 58 VMS__free_on_core(void *ptrToFree, int procrID);
msach@132 59
Me@53 60 /*Allocates memory from the external system -- higher overhead
Me@53 61 */
Me@53 62 void *
msach@76 63 VMS__malloc_in_ext( size_t sizeRequested );
Me@53 64
Me@53 65 /*Frees memory that was allocated in the external system -- higher overhead
Me@53 66 */
Me@53 67 void
Me@53 68 VMS__free_in_ext( void *ptrToFree );
Me@53 69
Me@50 70 MallocProlog *
Me@53 71 VMS_ext__create_free_list();
Me@50 72
Me@50 73 void
msach@135 74 VMS_ext__free_free_list( MallocProlog* freeListHead );
Me@65 75
Me@65 76 #endif