Lines Matching refs:ptrA

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