Problem with d2b called from sprintf
Jim & Lori Lawrence
jimlori@provide.net
Tue Oct 6 04:14:00 GMT 1998
ÃÂ
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?
ÃÂ
ÃÂ
More information about the crossgcc
mailing list