This is the mail archive of the
crossgcc@cygnus.com
mailing list for the crossgcc project.
Problem with d2b called from sprintf
- To: <crossgcc@cygnus.com>
- Subject: Problem with d2b called from sprintf
- From: "Jim & Lori Lawrence" <jimlori@provide.net>
- Date: Tue, 6 Oct 1998 06:45:25 -0400
- Reply-To: "Jim & Lori Lawrence" <jimlori@provide.net>
I'm using Newlib 1.8.1.
I'm having a problem with some data in low
memory being overwritten when calling sprintf. The calling sequence is as
follows:
1. Sprintf calls d2b in mprec.c
2. d2b calls balloc also in mprec.c
3. balloc calls calloc
4. calloc fails, returns a null pointer to balloc
5. balloc returns a null pointer to
d2b
4. d2b uses the null pointer as the base address
of a structure located at address zero
Apparently sprintf requires more heap space than
what is available. My embedded system has approximately 6K bytes available
for the heap. What are the minimum requirements for available heap space
for using sprintf?