Re: malloc() size limit
Dave Calkins wrote:
"Nathan Mates" <nathan@visi.com> wrote in message
news:13ru32g47q4adc0@corp.supernews.com...
Once things are allocated, there's no shuffling them around. DLLs
you build can be 'rebased' to load at specific addresses,
which can help slightly. Most of your DLLs should load towards the
bottom of your space, and a lot of the Windows DLLs sit right near
the top. However, there's a lot of system DLLs -- especially the
WinXP
theming DLL -- that load at really inconvenient fixed addresses.
There's also DLL injecting -- your keyboard, mouse, or IM
program(s) may be forcing themselves into your space. If you're
debugging w/ MS DevStudio, while your app is running, you can turn
on the Debug -> Windows -> Modules window to see what DLLs are
loaded where.
Thanks, I'll take a look at the modules list and see what it looks
like. Think there's any way to force load a DLL that you didn't
create at a different address?
Are your customers running your application in isolation, or are you
trying to move the problems to the other applications?
Using 25% of the virtual user space in one contiguous area, is like
saying that you need a private piece of land the size of South
America. Will everyone else please move aside!
Seems like there should be something pro-active we could do to
avoid the fragmentation we're seeing.
As has been stated before on this thread: go to a 64-bit
hardware, OS and compile your app for 64 bits. It is the best
solution by far.
I beg to differ. I don't see forcing the customer to move to
64-bit as the "best solution by far". In this case, in terms of
actual sizes, there's plenty of address space to support the
allocations being made, the problem is fragmentation. So if
there's a pro-active solution we can take to allow the customer to
get it working without just telling them to upgrade all their
hardware, that would be a better solution.
It *is* the best solution by far, if allocating huge amounts of
contiguous memory is the requirement. Instead of forcing everyone else
to move aside, you move yourself into a bigger world.
As others have said, *not* requireing contiguous memory is one
solution. Moving to a larger address space is another. Your choice.
Bo Persson