Reducing RAM usage for TCP connection

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Reducing RAM usage for TCP connection

Jump to solution
1,058 Views
kfranz
Contributor III

We are using MQX 4.2.

How do I reduce the RAM usage when a TCP connection is established?

0 Kudos
1 Solution
1,026 Views
kfranz
Contributor III

Thank you for the information.

Unfortunately, it will be several weeks before I can get back to this project. I will try your suggestions at that time.

View solution in original post

0 Kudos
2 Replies
1,027 Views
kfranz
Contributor III

Thank you for the information.

Unfortunately, it will be several weeks before I can get back to this project. I will try your suggestions at that time.

0 Kudos
1,046 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi

 

Usually we can reducing RAM usage at compile time.

You can refer to RTCS user-guider.pdf

chapter 8:  Compile time Options.

In what scenario you need to reducing RAM usage when a connection is established?

 

For UDP , we can change the socket tx/rx buffer size to reduce RAM usage at any time.

For TCP, we can change the socket rx/rx buffer size only before bound.

value = 256; 
setsockopt(sock, SOL_TCP,OPT_TBSIZE,&value,sizeof(value)); 
setsockopt(sock, SOL_TCP,OPT_RBSIZE,&value,sizeof(value));

 

So I would suggest you reduce RAM usage before TCP connection is established.

 

Regards

Daniel

 

Regards

Daniel

  

0 Kudos