[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GLPK memory problem
From: |
Michael Hennebry |
Subject: |
Re: GLPK memory problem |
Date: |
Sun, 3 Jul 2022 21:54:12 -0500 (CDT) |
User-agent: |
Alpine 2.21 (DEB 202 2017-01-01) |
This is a bit late.
On Wed, 4 May 2022, Domingo Alvarez Duarte wrote:
You are right about the maximum index is limited by using an 32 bits integer
but that doesn't mean that the memory allocation is also limited, we can have
several GigaBytes of allocated memory on 64 bits platforms and still have
less that 2^32 indices.
GLPK's xmalloc and xcalloc each take an int as its parameter.
Most ints can represent up to 2**31-1 .
Changing their parameters and a small amount of other code
would likely enlarge the available memory.
It would not solve the indexing issue.
xmalloc and xcalloc go through some gyrations to
ensure that the memory requested is a multiple of 16.
This seems unnessary.
The stated reason is already incorporated int malloc and calloc.
malloc and calloc return either NULL or
a pointer to suitably aligned memory.
Even if an odd block is requested,
there is no way for the immediately following byte to be allocated.
The code likely does little harm.
I'd remove it to reduce the code size.
--
Michael hennebry@web.cs.ndsu.NoDak.edu
"Sorry but your password must contain an uppercase letter, a number,
a haiku, a gang sign, a heiroglyph, and the blood of a virgin."
-- someeecards
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: GLPK memory problem,
Michael Hennebry <=