Changeset 105 for trunk/desktop/class_c/wpobject.c
- Timestamp:
- Nov 25, 2006, 8:56:42 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/desktop/class_c/wpobject.c
r104 r105 47 47 #include "wpobject.ih" 48 48 49 #include "desktoptypes.h" 50 49 51 NOM_Scope gpointer NOMLINK impl_WPObject_wpAllocMem(WPObject* nomSelf, const CORBA_unsigned_long cbBytes, 50 52 CORBA_unsigned_long* prc, CORBA_Environment *ev) 51 53 { 54 52 55 /* WPObjectData* nomThis=WPObjectGetData(nomSelf); */ 53 gpointer nomRetval; 56 gpointer ptrMem=NULLHANDLE; 57 PUSEITEM pui; 54 58 55 return nomRetval; 59 /* Add mem for the inuse list structures */ 60 ptrMem=NOMMalloc(cbBytes+sizeof(USEITEM)+sizeof(MEMORYITEM)); 61 62 if(!ptrMem) { 63 if(prc) 64 *prc=(gulong)NOMERROR_NOT_ENOUGH_MEMORY; 65 return NULLHANDLE; 66 } 67 68 /* Fill the structures */ 69 pui=(PUSEITEM)ptrMem; 70 pui->type=(ULONG)USAGE_MEMORY; 71 pui++; 72 ((MEMORYITEM*)pui)->cbBuffer=cbBytes; 73 74 #warning !!!!! Memory is not in inuse list !!!!! 75 /* Add memory to in use list */ 76 //_wpAddToObjUseList(somSelf, (PUSEITEM)pMem); 77 78 return ptrMem+sizeof(USEITEM)+sizeof(MEMORYITEM); 56 79 } 57 80 … … 61 84 CORBA_boolean nomRetval; 62 85 63 return nomRetval; 86 if(!pByte) 87 return FALSE; 88 89 /* remove from inuse list */ 90 #warning !!!!! Memory not removed from inuse list !!!!! 91 //_wpDeleteFromObjUseList(somSelf, (PUSEITEM)(pByte-sizeof(USEITEM)-sizeof(MEMORYITEM)) ); 92 93 NOMFree(pByte-sizeof(USEITEM)-sizeof(MEMORYITEM)); 94 return TRUE; /* free can't fail */; 64 95 } 65 96
Note:
See TracChangeset
for help on using the changeset viewer.