Lines Matching refs:end

79     p_BusyBlock->end = base + size;
118 p_MemBlock->end = base+size;
151 p_FreeBlock->end = base + size;
169 * end - end address of a given free block
175 static t_Error AddFree(t_MM *p_MM, uint64_t base, uint64_t end)
192 if (alignBase >= end)
198 if ( alignBase <= p_CurrB->end )
200 if ( end > p_CurrB->end )
203 while ( p_CurrB->p_Next && end > p_CurrB->p_Next->end )
211 if ( !p_NextB || (p_NextB && end < p_NextB->base) )
213 p_CurrB->end = end;
217 p_CurrB->end = p_NextB->end;
222 else if ( (end < p_CurrB->base) && ((end-alignBase) >= alignment) )
224 if ((p_NewB = CreateFreeBlock(alignBase, end-alignBase)) == NULL)
235 if ((alignBase < p_CurrB->base) && (end >= p_CurrB->base))
242 if ( (p_CurrB->end - p_CurrB->base) < alignment)
260 * to the end of the free list.
262 if ( !p_CurrB && ((((uint64_t)(end-base)) & ((uint64_t)(alignment-1))) == 0) )
264 if ((p_NewB = CreateFreeBlock(alignBase, end-base)) == NULL)
278 if ( p_CurrB && end < p_CurrB->end )
279 end = p_CurrB->end;
299 * holdEnd - end address of the allocated block
309 uint64_t alignBase, base, end;
324 end = p_CurrB->end;
326 if ( (holdBase <= base) && (holdEnd <= end) && (holdEnd > base) )
328 if ( alignBase >= end ||
329 (alignBase < end && ((end-alignBase) < alignment)) )
343 else if ( (holdBase > base) && (holdEnd <= end) )
347 if ( (alignBase < end) && ((end-alignBase) >= alignment) )
349 if ((p_NewB = CreateFreeBlock(alignBase, end-alignBase)) == NULL)
354 p_CurrB->end = holdBase;
356 else if ( (alignBase < end) && ((end-alignBase) >= alignment) )
424 * Cuts a block from base to end from the list of busy blocks.
430 * from the busy list and the end blocks are updated.
437 * end - end address of a given busy block
443 static t_Error CutBusy(t_MM *p_MM, uint64_t base, uint64_t end)
452 if ( base < p_CurrB->end )
454 if ( end > p_CurrB->end )
457 while ( p_CurrB->p_Next && end >= p_CurrB->p_Next->end )
465 if ( p_NextB && end > p_NextB->base )
467 p_NextB->base = end;
473 if ( end < p_CurrB->end && end > p_CurrB->base )
475 p_CurrB->base = end;
477 else if ( end >= p_CurrB->end )
488 if ( end < p_CurrB->end && end > p_CurrB->base )
490 if ((p_NewB = CreateBusyBlock(end,
491 p_CurrB->end-end,
497 p_CurrB->end = base;
558 alignBase < p_FreeB->end &&
559 size <= (p_FreeB->end - alignBase) )
730 while ( p_FreeB && (p_FreeB->end - p_FreeB->base) < size )
781 if ( base >= p_FreeB->base && (base+size) <= p_FreeB->end )
848 while ( p_FreeB && (min >= p_FreeB->end))
860 if ((holdBase + size) <= p_FreeB->end )
867 while ( p_FreeB && ((p_FreeB->end - p_FreeB->base) < size) )
931 if ( AddFree( p_MM, p_BusyB->base, p_BusyB->end ) != E_OK )
943 size = p_BusyB->end - p_BusyB->base;
955 uint64_t end = base + size;
961 if ( CutBusy( p_MM, base, end ) != E_OK )
967 if ( AddFree ( p_MM, base, end ) != E_OK )
994 if ( base >= p_MemB->base && base < p_MemB->end )
1002 if ( base >= p_MemB->base && base < p_MemB->end )
1015 /* append a new memory block to the end of the list of memory blocks */
1073 if ((addr >= p_MemBlock->base) && (addr < p_MemBlock->end))
1092 p_BusyB, p_BusyB->name, p_BusyB->base, p_BusyB->end );
1104 p_FreeB, p_FreeB->base, p_FreeB->end);