[SCIP] buffer and block memory

Marc Pfetsch pfetsch at mathematik.tu-darmstadt.de
Mon Jun 25 17:48:29 CEST 2018


Dear James,

it is possible to use buffer memory in this case. Whether it is
advisable depends on how often your function is called from the outside.
As a rule of thumb, the more often, the larger the benefit from using
buffer memory.

We tried to explain why this is the case in the documentation:

http://scip.zib.de/doc-5.0.1/html/MEMORY.php


Hope this helps.

Best

Marc



On 25/06/18 09:28, James Cussens wrote:
> I would like more detail on when it is appropriate to use buffer versus
> block memory in SCIP.
> 
> I have a function  which looks like this:
> 
> /*STARTS*/
> int* counts;
> ...
> SCIP_CALL( SCIPallocClearBlockMemoryArray(scip, &counts, n) );
>  
> foo(counts, n, ...);
> bar(counts, n,...);
> 
>  SCIPfreeBlockMemoryArray(scip, &counts, n);
> ...
> /*ENDS*/
> 
> So counts is allocated and freed in the same function, but it used in
> other functions. So is it OK (and better) to have this as buffer memory?
> 
> James
> 
> 
> -- 
> James Cussens
> Dept of Computer Science &
> York Centre for Complex Systems Analysis
> Room 326, The Hub, Deramore Lane            Tel    +44 (0)1904 325371
> University of York                                        Fax  +44
> (0)1904 500159
> York YO10 5GE, UK                              
> http://www.cs.york.ac.uk/~jc <http://www.cs.york.ac.uk/%7Ejc>
> http://www.york.ac.uk/docs/disclaimer/email.htm
> 
> 
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip
> 


More information about the Scip mailing list