[Wine] Re: malloc small pieces of memory

Geoff Streeter geoff at dyalog.com
Mon Jun 26 10:45:09 CDT 2006


At 2006-06-26 16:30 +0200, Johannes Holzer wrote:
>Daniel Skorka schrieb:
> > Johannes Holzer <hl.ichaus at arcor.de> wrote:
> >> I have a Problem with wine. I have one Program, that allogaces many
> >> small pieces with "malloc()" in the memory. "many" means over 2 Mio,
> >> "small" means "from 8 to 128 bytes" in size.
> >>
> >> Running this Program on Windows gives me ~300MB Memory Usage (according
> >> to one of the values in the Tast manager). In Linux, "top" shows me a
> >> physical Usage of about 300MB and a virtual size of ~2.8 GB.
> >
> > 2e06 chunks of 128 bytes gives about 244 MB. Wine needs 2.8 GB of
> > virtual memory because it doesn't. It just needs an address space that
> > large.
>
>Right. "top" has a column "RES" ("Resident size"), which shows about 300
>MB. This sounds reasonable.
>
> >> With Linux/Wine, the program fails with an "out of memory"-Error (malloc
> >> returns NULL).
> >
> > If it fails, how can you tell its memory usage with top?
>
>The programmer was a good one. He checked the returncode of malloc and
>displays a dialog on failure. (yes, it seems, that there is enough RAM
>for the dialog.)
>
>Johannes Holzer
>_______________________________________________
>wine-users mailing list
>wine-users at winehq.org
>http://www.winehq.org/mailman/listinfo/wine-users

Dumb question: Are you being bounced by ulimit? 




More information about the wine-users mailing list