Hello all,

The 32-bit application I work on needs to able to validate a long string in XML 
against a complex regular expression in the XSD (using xerces-c)
For this to work correctly the stack size was increased somewhere in the past; 
on Unix using setrlimit, in mingw32 with 'LDFLAGS += -Wl,--stack,0x02000000' 
(32MiB)

However, when creating many (50+) pthreads the system complains about lacking 
resources (only on Windows), with the following error:
pthread_create (11): Not enough memory resources are available to process this 
command.

I believe that's because the application is reaching the 32-bit limits for 
memory.
Ideally I'd like to get the extra stack only for specific work and not always, 
but I don't see how.

I've seen the "processthreadsapi" and noticed that it has a 'dwStackSize' 
parameter and that there's a flag to set it merely as a reservation 
'STACK_SIZE_PARAM_IS_A_RESERVATION'
I guess a reservation would be fine too.

Any hints on how to resolve this issue?

Kind regards,

Erik






Disclaimer: This mail transmission and any attached files are confidential and 
are intended for the addressee only. If you are not the person or organization 
to whom it is addressed, you must not copy, disclose, distribute or take any 
action in reliance upon it. If you have received this message in error, please 
contact the sender by email and delete all copies of this message and all 
copies of any attached files.

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to