This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Re: uSTL how to use it?
Thann
The mallinfo() tip was helping.
I did some simple test-programs, where the code don't crash and the
RAM-usage is like expected, but still the iostreams don't work like i
expect it. The ofstream cant write to a serial or USB device, and the
istringstream wont read a long.
example1:
ostream fo;
fo.open("/tty2");
fo.good(); //returns false
example2
long n;
istream ss;
ss.str("12");
diag_printf(ss.str().c_str()); //prints "12"
ss >> n; //blocks for ever
I hope i find some time to look at it closer...
Oliver
Sergei Gavrikov schrieb:
Oliver Munz wrote:
In the moment i think it's possible that the crashes come from a RAM
shortage... I looked at the stack usages, and they look ok, but i
don't know how to check the stack-usage of the interrupt-stack and i
have no idea how to check the heap-usage. Can You give me some hints
on this?
Look on a comment to CDL option CYGNUM_KERNEL_THREADS_IDLE_STACK_SIZE.
About memory usage: it seems for me that you can use mallinfo() to
check memory usage (refer to stdlib.h). Also, try to enable asserts if
you can.
Sergei
Thanks Oliver
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss