Big memory leak????
"Сергеев Василий" <[email protected]>
| Newsgroups | gmane.comp.hardware.microcontrollers.tini |
|---|---|
| Message-ID | <[email protected]> |
Hello, everyone!
My programm use ExternalInterruptEvent for calling some native
function when ExtInt occur on the pin (my device generate
ExtInt evry 300ms).
ExternalInterruptEvent start native function with some
parameters ( one of them is byte_array_pointer). Native
function read data from PCE0 and write it to
byte_array_pointer, after that it read the data from
byte_array_pointer and write it to file_data_pointer (which is
calculated every time after native function).
After native function my ExternalInterruptEvent send
byte_array_data to CANBus if necessary.
file_data_pointer is calculated by this way:
NextDataPointer (pointer to the next block of 512 bytes) is
settled by using 3 first bytes of first data block.
CurrentDataPointer=NextDataPointer+3;
After every call of native function
if(we stay in the same data block)
{
CurrentDataPointer+=48; (48 - length of data written to
file)
}
else
{
I write first part of data until the end of data block;
I set NextDataPointer and CurrentDataPointer;
I write the last part of data to the begining of the next
data block;
}
My questions are:
1. this application sometimes hang-up. I can see it from
oscillograph (because my device set off the ExtInt when I read
all data from it (48 byte)). It looks like sometimes
ExternalInterruptEvent dont see that there is a signal on
ExtInt.It continue to hang-up for 300 ms (maybe a little
more). So I dont see one chunk of data. Why???
2. when I begin to send all 48 bytes to CANBus (it happens in
ExternalInterruptEvent), application begin to hanging-up very
often. Why???
3. This is the most important question.
After starting the application I watch the size of free RAM by
console command STATS. Before starting the programm the size
of free RAM is ~300 Kbytes. After I start it the size is
decreasing very fast and in 10-20 seconds it reach 50-60
Kbytes. After that it goes up-down. But sometimes the size is
less than 10 Kbytes; and when there is no free RAM, my
programm is terminated :((((( Why my app use so much memory???
Maybe it depends on the problem from first question???
Regards,
Vasiliy
_______________________________________________
TINI mailing list
TINI-6tN4nzCoH/[email protected]
To UNSUBSCRIBE, edit your profile, or see list archives:
http://lists.dalsemi.com/mailman/listinfo/tini