[SDL] Array size limit?
Lilith Calbridge
lilith at dcccd.edu
Mon Feb 12 07:47:17 PST 2007
That wouldn't a limit of SDL, would it, but rather of the compiler and
the memory model it's compiling under. Used to be under my old compiler
I couldn't reserve more than 64K because of the size of the memory
segment. That was primarily for console based programs. Although
Windows allows something like 4 Gig of total space for a program, there
might still be a limitation on any given piece of data.
With what I know today I'd probably be more inclined to use C++ and a
vector class. Even then there still might be some limitations depending
on how the vector class is implemented.
Lilith
>>> On 2/12/2007 at 2:54 AM, Anttoni Jaakkola <anttoj at saunalahti.fi>
wrote:
Hello,
I'm sorry to bother you because I'm sure my question has been already
answered somewhere but I just can't find the answer. So here's the
question:
Is there some kind of a limit in SDL for the amount of memory that can
be allocated? I'm trying to allocate space for double[57000000] (don't
ask why) but it causes an access violation/segmentation fault. Even
double[270000] seems to be too much. Without SDL I can easily allocate
the memory I need (actually about 453 megabytes of it). I've tried
allocating the memory both statically and dynamically.
Thanks in advance.
Anttoni Jaakkola
_______________________________________________
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20070212/3cca0d16/attachment-0001.html
More information about the SDL
mailing list