Lines Matching full:block
18 * 2013-07-11 Grissiom fix the memory block splitting issue.
42 * | whole freed memory block | Used Memory Block Tailer |
45 * block_list --> whole freed memory block
47 * The length of Used Memory Block Tailer is 0,
48 * which is prevents block merging across list
79 /* initialize the first big memory block */ in rt_memheap_init()
92 /* block list header */ in rt_memheap_init()
95 /* place the big memory block to free list */ in rt_memheap_init()
101 /* move to the end of memory pool to build a small tailer block, in rt_memheap_init()
102 * which prevents block merging in rt_memheap_init()
105 /* it's a used memory block */ in rt_memheap_init()
169 /* get the first free memory block */ in rt_memheap_alloc()
173 /* get current freed memory block size */ in rt_memheap_alloc()
177 /* move to next free memory block */ in rt_memheap_alloc()
185 /* a block that satisfies the request has been found. */ in rt_memheap_alloc()
187 /* determine if the block needs to be split. */ in rt_memheap_alloc()
192 /* split the block. */ in rt_memheap_alloc()
197 ("split: block[0x%08x] nextm[0x%08x] prevm[0x%08x] to new[0x%08x]\n", in rt_memheap_alloc()
203 /* mark the new block as a memory block and freed. */ in rt_memheap_alloc()
206 /* put the pool pointer into the new block. */ in rt_memheap_alloc()
209 /* break down the block list */ in rt_memheap_alloc()
246 ("one block: block[0x%08x], next_free 0x%08x, prev_free 0x%08x\n", in rt_memheap_alloc()
257 /* Mark the allocated block as not available. */ in rt_memheap_alloc()
310 /* get memory block header and get the size of memory block */ in rt_memheap_realloc()
343 * block: in rt_memheap_realloc()
359 ("remove block: block[0x%08x], next_free 0x%08x, prev_free 0x%08x", in rt_memheap_realloc()
373 ("new free block: block[0x%08x] nextm[0x%08x] prevm[0x%08x]", in rt_memheap_realloc()
378 /* mark the new block as a memory block and freed. */ in rt_memheap_realloc()
381 /* put the pool pointer into the new block. */ in rt_memheap_realloc()
408 /* re-allocate a memory block */ in rt_memheap_realloc()
432 /* split the block. */ in rt_memheap_realloc()
437 ("split: block[0x%08x] nextm[0x%08x] prevm[0x%08x] to new[0x%08x]\n", in rt_memheap_realloc()
443 /* mark the new block as a memory block and freed. */ in rt_memheap_realloc()
445 /* put the pool pointer into the new block. */ in rt_memheap_realloc()
448 /* break down the block list */ in rt_memheap_realloc()
454 /* determine if the block can be merged with the next neighbor. */ in rt_memheap_realloc()
459 /* merge block with next neighbor. */ in rt_memheap_realloc()
475 /* insert the split block to free list */ in rt_memheap_realloc()
490 /* return the old memory block */ in rt_memheap_realloc()
511 RT_DEBUG_LOG(RT_DEBUG_MEMHEAP, ("free memory: memory[0x%08x], block[0x%08x]\n", in rt_memheap_free()
517 /* check whether this block of memory has been over-written. */ in rt_memheap_free()
540 /* Determine if the block can be merged with the previous neighbor. */ in rt_memheap_free()
549 /* yes, merge block with previous neighbor. */ in rt_memheap_free()
559 /* determine if the block can be merged with the next neighbor. */ in rt_memheap_free()
565 /* merge block with next neighbor. */ in rt_memheap_free()
677 /* allocate memory block from other memheap */ in rt_realloc()
683 /* get the size of old memory block */ in rt_realloc()