Changeset 6710 for trunk/src/quartz/memalloc.c
- Timestamp:
- Sep 15, 2001, 11:28:23 AM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/quartz/memalloc.c
r6649 r6710 1 /* $Id: memalloc.c,v 1.3 2001-09-05 13:36:37 bird Exp $ */2 1 /* 3 2 * Implementation of CLSID_MemoryAllocator. … … 31 30 }; 32 31 32 static void QUARTZ_DestroyMemoryAllocator(IUnknown* punk) 33 { 34 CMemoryAllocator_THIS(punk,unk); 35 36 CMemoryAllocator_UninitIMemAllocator( This ); 37 } 38 33 39 HRESULT QUARTZ_CreateMemoryAllocator(IUnknown* punkOuter,void** ppobj) 34 40 { 35 CMemoryAllocator* pma; 41 CMemoryAllocator* pma; 42 HRESULT hr; 36 43 37 44 TRACE("(%p,%p)\n",punkOuter,ppobj); 38 45 39 40 41 46 pma = (CMemoryAllocator*)QUARTZ_AllocObj( sizeof(CMemoryAllocator) ); 47 if ( pma == NULL ) 48 return E_OUTOFMEMORY; 42 49 43 QUARTZ_IUnkInit( &pma->unk, punkOuter ); 44 CMemoryAllocator_InitIMemAllocator( pma ); 50 QUARTZ_IUnkInit( &pma->unk, punkOuter ); 51 hr = CMemoryAllocator_InitIMemAllocator( pma ); 52 if ( FAILED(hr) ) 53 { 54 QUARTZ_FreeObj( pma ); 55 return hr; 56 } 45 57 46 pma->unk.pEntries = IFEntries; 47 pma->unk.dwEntries = sizeof(IFEntries)/sizeof(IFEntries[0]); 58 pma->unk.pEntries = IFEntries; 59 pma->unk.dwEntries = sizeof(IFEntries)/sizeof(IFEntries[0]); 60 pma->unk.pOnFinalRelease = QUARTZ_DestroyMemoryAllocator; 48 61 49 62 *ppobj = (void*)(&pma->unk); 50 63 51 64 return S_OK; 52 65 }
Note:
See TracChangeset
for help on using the changeset viewer.