We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
I am using RL-TCP library in my LPC2148 with RTL8019 as a ethernet controller. I am getting ERR_MEM_ALLOC error after some tcp activity.
I have MEM_SIZE: Memory Pool size in bytes = 16384 in my config wizard.
Can anybody help me why i am getting this system error ?
Thanks
Maybe you have a "memory leak" - ie, you don't always properly release memory when you've finished with it.
Or, maybe you've just underestimated your memory requirements?
Or, maybe you're allocating more memory than necessary
etc, etc,...
You have the code - You need to do some investigation
Thanks for reply !!
but error does not come when I unplugged LAN cable, it is something related to tcp only.
secondly I am not sending data over tcp more than 256 bytes, the code is
unsigned char GUC_tcp_sck_h; unsigned char GUCA_TCP_Tx_Data[256]; . . . . // socket creating & connection establishing . . //assigning some data to buffer GUCA_TCP_Tx_Data . void Transmit_Data(unsigned short length) { unsigned char * sendbuf; sendbuf = tcp_get_buf (length); memcpy (sendbuf, GUCA_TCP_Tx_Data, length); tcp_send (GUC_tcp_sck_h, sendbuf, length); }
is something wrong in code ?
I got the same error and in line it compiled ok like this
<code> integerLastPacekIdentity = Add_up_characters(24/integerSizeBuffer); </code>
but it freezed when i connect. so i had to change like this
<code> integerLastPacetIdemtity = Add_up_characters(22/integerSizeBuffer); </code>
and it worked
you have same problem?
Please read the instructions on how to post source code: www.danlhenry.com/.../keil_code.png
and use the 'Preview' to verify it...
Hi, I got the same error and in line it compiled ok like this <code> integerLastPacekIdentity = Add_up_characters(24/integerSizeBuffer); </code> but it freezed when i connect. so i had to change like this <code> integerLastPacetIdemtity = Add_up_characters(22/integerSizeBuffer); </code> and it worked you have same problem?
Hey Bular Zelkar... Andy Neil will kill u :)
Are you really sure that you used the preview function to check that the post looked reasonable before posting?
"but error does not come when I unplugged LAN cable, it is something related to tcp only."
OK, so you've narrowed it down a bit - keep going!
"is something wrong in code ?"
Where is the memory allocated for 'sendbuf' released?
The Description of tcp_get_buf () says : This function is used to allocate memory for the TCP send buffer. It is called when the application wants to send TCP data packet. The allocated memory buffer will be deallocated by the TcpNet system, when the frame has been sent and acknowledged by remote peer.
Hi (yes me agin),
I use the preview last b4 and it look ok
i try help you and it is bad trouble 4 me.
integerLastPacekIdentity = Add_up_characters(24/integerSizeBuffer);
integerLastPacetIdemtity = Add_up_characters(22/integerSizeBuffer);