[AWS] Large embedded resources

David Marceau davidmarceau@sympatico.ca
Mon, 26 Jan 2004 09:53:50 -0500


"Alejandro. R. Mosteo Chagoyen" wrote:
> Awsres generates a header of 24MB; so far, so good.
> 
> The problem is in Gnat (3.15p Win32) itself, which skyrockets its
> memory usage: I've seen 200 MB in use, 600 in virtual swap usage,
> before interrupting it after 15 minutes, trying to compile the main
> resources body (the one which "withes" the large resource).
Is it really the compiler that goes up to 200MB usage with 600virtual or
your exe running and giving you this memory usage?
I have a feeling you have at least 10 aws concurrent sessions running right?
24MB per resource * 10 aws sessions =about 200MB

If it really is the compiler, you could somehow place your one resource in its
own data segment.  I don't remember off hand how to do this but if you look
around it may help. Another thing which could be a hack would be to split your
resource into smaller parts into different data segments and then recombining it
for the result to return on the http request.
At least the compiler would breathe a bit better and you would be able to do
your work right?
The other option is that you actually modify awsres sources to do this for you
for any other big resources you throw at the compiler.