WinDBG/Exts/CodeAnalyzer/gdbplus/gdb-1824/src/gdb/segment.c
// Expand buffer for at least "inc" slots
Expand buffer for at least "inc" slots
Expand buffer for at least " inc " slots
static void prepare_segment_buffer(unsigned int inc)
{
	if (!g_segments)
	{
		g_segments = (struct ca_segment*) malloc(sizeof(struct ca_segment)*INIT_SEG_BUFFER_SZ);
		g_segment_buffer_size = INIT_SEG_BUFFER_SZ;
	}
	else if (g_segment_count + inc > g_segment_buffer_size)
	{
		g_segment_buffer_size *= 2;
		g_segments = (struct ca_segment*) realloc(g_segments, sizeof(struct ca_segment)*g_segment_buffer_size);
	}
}
static void prepare_segment_buffer ( unsigned int inc ) { if ( ! g_segments ) { g_segments = ( struct ca_segment * ) malloc ( sizeof ( struct ca_segment ) * INIT_SEG_BUFFER_SZ ) ; g_segment_buffer_size = INIT_SEG_BUFFER_SZ ; } else if ( g_segment_count + inc > g_segment_buffer_size ) { g_segment_buffer_size *= 2 ; g_segments = ( struct ca_segment * ) realloc ( g_segments , sizeof ( struct ca_segment ) * g_segment_buffer_size ) ; } }
Expand buffer for at least "inc" slots
Expand buffer for at least " inc " slots