Lines Matching defs:nbytes
56 real_size(int alignment, int nbytes)
61 wasted = alignment - ( nbytes % alignment );
63 nbytes += wasted;
66 return nbytes;
69 /* Add a new current_block to the Blocks* chain, adjust size if nbytes big. */
71 add_block(Blocks *blocks, int nbytes)
78 HPROF_ASSERT(nbytes>0);
82 if ( nbytes > block_size ) {
83 block_size = real_size(blocks->alignment, nbytes);
121 blocks_alloc(Blocks *blocks, int nbytes)
128 HPROF_ASSERT(nbytes>=0);
129 if ( nbytes == 0 ) {
134 nbytes = real_size(blocks->alignment, nbytes);
135 if ( block == NULL || block->bytes_left < nbytes ) {
136 add_block(blocks, nbytes);
141 block->next_pos += nbytes;
142 block->bytes_left -= nbytes;