Lines Matching full:ptra
42 struct bbs_MemSeg* ptrA )
44 ptrA->memPtrE = NULL;
45 ptrA->sizeE = 0;
46 ptrA->allocIndexE = 0;
47 ptrA->sharedE = FALSE;
48 ptrA->idE = 0;
49 ptrA->dynMemManagerPtrE = NULL;
55 struct bbs_MemSeg* ptrA )
57 ptrA->memPtrE = NULL;
58 ptrA->sizeE = 0;
59 ptrA->allocIndexE = 0;
60 ptrA->sharedE = FALSE;
61 ptrA->idE = 0;
62 ptrA->dynMemManagerPtrE = NULL;
84 const struct bbs_MemSeg* ptrA )
86 if( ptrA->dynMemManagerPtrE == NULL )
88 return ( ptrA->sizeE == ptrA->allocIndexE ) ? 0 : ptrA->sizeE - ptrA->allocIndexE - 2 * ptrA->sharedE;
99 const struct bbs_MemSeg* ptrA )
101 if( ptrA->dynMemManagerPtrE == NULL )
103 return ptrA->allocIndexE;
107 return bbs_DynMemManager_allocatedSize( cpA, ptrA->dynMemManagerPtrE );
114 const struct bbs_MemSeg* ptrA )
116 if( ptrA->dynMemManagerPtrE == NULL )
118 if( ptrA->sharedE )
120 return ptrA->allocIndexE;
126 while( indexL < ptrA->allocIndexE )
128 uint32 sizeL = *( uint32* )( ptrA->memPtrE + indexL );
140 return bbs_MemSeg_allocatedSize( cpA, ptrA );
147 const struct bbs_MemSeg* ptrA )
152 if( ptrA->sharedE ) return 0;
154 while( indexL < ptrA->allocIndexE )
156 uint32 sizeL = *( uint32* )( ptrA->memPtrE + indexL );
166 const struct bbs_MemSeg* ptrA )
171 if( ptrA->sharedE ) return 0;
173 while( indexL < ptrA->allocIndexE )
175 uint32 sizeL = *( uint32* )( ptrA->memPtrE + indexL );
239 struct bbs_MemSeg* ptrA,
246 if( !ptrA->sharedE )
248 if( ptrA->dynMemManagerPtrE == NULL )
251 memPtrL = ptrA->memPtrE + ptrA->allocIndexE;
254 if( ptrA->allocIndexE + effSizeL > ptrA->sizeE )
257 "uint16* bbs_MemSeg_alloc( struct bbs_MemSeg* ptrA, uint32 sizeA ):\n"
258 "Exclusive Memory overflow. Segment size: %i. Requested size: %i", ptrA->sizeE, sizeA );
261 ptrA->allocIndexE += effSizeL;
265 memPtrL = bbs_DynMemManager_alloc( cpA, ptrA->dynMemManagerPtrE, ptrA, sizeA );
272 if( ptrA->allocIndexE + effSizeL > ptrA->sizeE + ( ptrA->sizeE & 1 ) )
274 if( ptrA->dynMemManagerPtrE == NULL )
277 "uint16* bbs_MemSeg_alloc( struct bbs_MemSeg* ptrA, uint32 sizeA ):\n"
278 "Shared Memory overflow. Segment size: %i. Requested size: %i", ptrA->sizeE, sizeA );
284 ptrA->memPtrE = bbs_DynMemManager_nextBlock( cpA, ptrA->dynMemManagerPtrE, ptrA, ptrA->memPtrE, effSizeL, &actualBlockSizeL );
285 ptrA->sizeE = actualBlockSizeL;
286 ptrA->allocIndexE = 0;
290 memPtrL = ptrA->memPtrE + ptrA->allocIndexE;
291 ptrA->allocIndexE += effSizeL;
298 if( ( ( ( uint32 ) ptrA->memPtrE ) >> 16 ) !=
299 ( ( ( uint32 ) ptrA->memPtrE + ( ptrA->sizeE - 1 ) ) >> 16 ) )
301 bbs_ERROR0( "uint16* bbs_MemSeg_alloc( struct bbs_MemSeg* ptrA, uint32 sizeA ):\nSegment crosses page boundary\n" );
314 struct bbs_MemSeg* ptrA,
317 bbs_DEF_fNameL( "void bbs_MemSeg_free( struct bbs_MemSeg* ptrA, void* memPtrA )" )
322 if( ptrA == NULL || memPtrA == NULL || ptrA->sharedE ) return;
324 if( ptrA->dynMemManagerPtrE != NULL )
326 bbs_DynMemManager_free( cpA, ptrA->dynMemManagerPtrE, memPtrA );
333 if( ptrA == NULL || memPtrA == NULL ) return;
334 if( ptrA->sharedE ) return;
337 indexL = ( uint32 ) memPtrA - ( uint32 ) ptrA->memPtrE - 2;
339 indexL = ( uint16* )memPtrA - ptrA->memPtrE - 2;
342 memPtrL = ptrA->memPtrE + indexL;
346 if( indexL > ptrA->allocIndexE || ( indexL & 1 ) != 0 )
353 ptrA->sizeE,
354 ptrA->allocIndexE,
368 if( indexL + sizeL == ptrA->allocIndexE )
372 while( indexL < ptrA->allocIndexE )
374 uint32 sizeL = *( uint32* )( ptrA->memPtrE + indexL );
382 ptrA->allocIndexE = newAllocIndexL;
386 bbs_MemSeg_checkConsistency( cpA, ptrA );
395 const struct bbs_MemSeg* ptrA )
399 if( ptrA->sharedE ) return;
401 while( indexL < ptrA->allocIndexE )
403 uint32 sizeL = *( uint32* )( ptrA->memPtrE + indexL );
407 if( indexL != ptrA->allocIndexE )