model_server/process/src/MemSeg.h.cxx
//-----------------------------------------------------
// MemorySegment::sbrk
//
// Ask system for more memory 
//-----------------------------------------------------
:sbrk
Ask system for more memory
: sbrk Ask system for more memory
void* MemorySegment::sbrk (int incr_size)
{
    int used;
    if ( incr_size > (seg_size-seg_used)) {
	msg("$1: size of memory segment exhausted", normal_sev) << err_tag << eom;
	if (seg_size == __cpp_shared_size * ONEMEG) {
	    msg("$1: set \"setenv $2 $3\", and try again", normal_sev) << msg_tag << eoarg << env_cpp_shmem << eoarg << __cpp_shared_size + DEFAULT_CPP_SHARED_SIZE +
			 DEFAULT_ESQL_SHARED_SIZE << eom;
	} else if (seg_size == __parser_shared_size * ONEMEG) {
	    msg("$1: set \"setenv $2 $3\", and try again", normal_sev) << msg_tag << eoarg << env_parser_shmem << eoarg << __parser_shared_size + DEFAULT_CPP_SHARED_SIZE +
			 DEFAULT_ESQL_SHARED_SIZE << eom;
	}
	return 0;
    }
    used = seg_used;
    seg_used += incr_size;
    return (void*)(self + used);
}
void * MemorySegment :: sbrk ( int incr_size ) { int used ; if ( incr_size > ( seg_size - seg_used ) ) { msg ( " " , normal_sev ) << err_tag << eom ; if ( seg_size == __cpp_shared_size * ONEMEG ) { msg ( " \" \" " , normal_sev ) << msg_tag << eoarg << env_cpp_shmem << eoarg << __cpp_shared_size + DEFAULT_CPP_SHARED_SIZE + DEFAULT_ESQL_SHARED_SIZE << eom ; } else if ( seg_size == __parser_shared_size * ONEMEG ) { msg ( " \" \" " , normal_sev ) << msg_tag << eoarg << env_parser_shmem << eoarg << __parser_shared_size + DEFAULT_CPP_SHARED_SIZE + DEFAULT_ESQL_SHARED_SIZE << eom ; } return 0 ; } used = seg_used ; seg_used += incr_size ; return ( void * ) ( self + used ) ; }
MemorySegment::sbrk
Ask system for more memory
MemorySegment :: sbrk Ask system for more memory
// Check to see if segment has enough space left. For now, if there isnt  // return 0 for nor more space available, here we would normally add more // extend the segment file.