/** creates block memory structures */ SCIP_RETCODE SCIPmemCreate( SCIP_MEM** mem /**< pointer to block memory structure */ ) { assert(mem != NULL); SCIP_ALLOC( BMSallocMemory(mem) ); SCIP_ALLOC( (*mem)->setmem = BMScreateBlockMemory(1, 10) ); SCIP_ALLOC( (*mem)->probmem = BMScreateBlockMemory(1, 10) ); SCIPdebugMessage("created setmem block memory at <%p>\n", (void*)(*mem)->setmem); SCIPdebugMessage("created probmem block memory at <%p>\n", (void*)(*mem)->probmem); return SCIP_OKAY; }
/** creates block and buffer memory structures */ SCIP_RETCODE SCIPmemCreate( SCIP_MEM** mem /**< pointer to block and buffer memory structure */ ) { assert(mem != NULL); SCIP_ALLOC( BMSallocMemory(mem) ); /* alloc block memory */ SCIP_ALLOC( (*mem)->setmem = BMScreateBlockMemory(1, 10) ); SCIP_ALLOC( (*mem)->probmem = BMScreateBlockMemory(1, 10) ); /* alloc memory buffers */ SCIP_ALLOC( (*mem)->buffer = BMScreateBufferMemory(SCIP_DEFAULT_MEM_ARRAYGROWFAC, SCIP_DEFAULT_MEM_ARRAYGROWINIT, FALSE) ); SCIP_ALLOC( (*mem)->cleanbuffer = BMScreateBufferMemory(SCIP_DEFAULT_MEM_ARRAYGROWFAC, SCIP_DEFAULT_MEM_ARRAYGROWINIT, TRUE) ); SCIPdebugMessage("created setmem block memory at <%p>\n", (void*)(*mem)->setmem); SCIPdebugMessage("created probmem block memory at <%p>\n", (void*)(*mem)->probmem); SCIPdebugMessage("created buffer memory at <%p>\n", (void*)(*mem)->buffer); SCIPdebugMessage("created clean buffer memory at <%p>\n", (void*)(*mem)->cleanbuffer); return SCIP_OKAY; }