[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: patch: under Windows, cvs status reports "memory exhausted"
From: |
Derek Robert Price |
Subject: |
Re: patch: under Windows, cvs status reports "memory exhausted" |
Date: |
Thu, 25 Mar 2004 16:03:09 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Chris Bohn wrote:
> x2realloc wasn't the problem; it was the wrapper function around it,
> expand_string, which is called from xrealloc_and_strcat.
x2realloc (str, size) doubles *size (setting it in the process), and
returns xrealloc (str, *size). This is exactly what expand_string()
used to be doing.
There should also be no difference in the behavior of expand_string() or
x2realloc() between UNIX & Windows. Can you provide a debugger stack
trace for the `cvs status' failure you reported?
Once again:
> void
> expand_string (char **strptr, size_t *n, size_t newsize)
> {
> while (*n < newsize)
> *strptr = x2realloc (*strptr, n);
> }
>
> The first line will likely always be true because this function is
> called to append two strings in this case.
No, it won't. In your example above, x2realloc(*strptr, n) doubles *n
with each invocation. Please provide a stack trace.
Derek
- --
*8^)
Email: derek@ximbiot.com
Get CVS support at <http://ximbiot.com>!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Netscape - http://enigmail.mozdev.org
iD8DBQFAY0kNLD1OTBfyMaQRAjpXAJ4qnRzoDgLnNVAHO5kxRee9Zz4PHwCfaQ8s
92LRHhNFESk5mUApftthq2k=
=d9f4
-----END PGP SIGNATURE-----
- patch: under Windows, cvs status reports "memory exhausted", Chris Bohn, 2004/03/25
- Re: patch: under Windows, cvs status reports "memory exhausted", Derek Robert Price, 2004/03/25
- Re: patch: under Windows, cvs status reports "memory exhausted", Chris Bohn, 2004/03/25
- Re: patch: under Windows, cvs status reports "memory exhausted",
Derek Robert Price <=
- Re: patch: under Windows, cvs status reports "memory exhausted", Chris Bohn, 2004/03/25
- Re: patch: under Windows, cvs status reports "memory exhausted", Chris Bohn, 2004/03/25
- Re: patch: under Windows, cvs status reports "memory exhausted", Derek Robert Price, 2004/03/25