pike.git / src / modules / _Stdio / buffer.cmod

version» Context lines:

pike.git/src/modules/_Stdio/buffer.cmod:278:       if( UNLIKELY(io->len + bytes > io->allocated) )    {    size_t new_len = io->allocated;    void *new_ptr;       do    new_len = ((new_len+32)*2)-32;    while( new_len < io->len + bytes );    -  new_ptr = xrealloc( io->buffer, bytes ); +  new_ptr = xrealloc( io->buffer, new_len );    if( !new_ptr ) -  Pike_error(msg_out_of_mem_2, bytes ); +  Pike_error(msg_out_of_mem_2, new_len );    io->buffer = new_ptr;    io->num_malloc++;    io->allocated = new_len;    }    return io->buffer+io->len;    }       static unsigned char *io_add_space( Buffer *io, size_t bytes, int force )    {    if( io->len == io->offset )