This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TI-RTOS-MCU: getaddrinfo: Error: couldn't alloc DNS buffer

Part Number: TI-RTOS-MCU
Other Parts Discussed in Thread: TM4C1294KCPDT

Hi,

I'm working on HTTPS POST project in which I'm trying to post some data to a host.

When I call "ret = HTTPCli_initSockAddr((struct sockaddr *)&addr, MY_HOSTNAME_HERE, 0);" too often, it seems that sometimes the code runs into memory issues and fails to resolve the DNS. 

From the error message I can see that it is related to memory getaddrinfo: Error: couldn't alloc DNS buffer.

Is there some setting that needs to be changed in .cfg file?
Or some command needs to be called?

I'm Using TI_RTOS 2.16.01.14 on TM4C1294KCPDT

I have 2 tasks that are running. One is HTTPS POST and Other a UDP task. UDP task is running continuously and POST task is being triggered by a interrupt.

This is what I have in my .cfg file.

/*
* Specify default heap size for BIOS.
*/
BIOS.heapSize = 131072;

/* ================ NDK configuration ================ */
var Ndk = xdc.loadPackage('ti.ndk.config');
var Global = xdc.useModule('ti.ndk.config.Global');
var Tcp = xdc.useModule('ti.ndk.config.Tcp');
var Udp = xdc.useModule('ti.ndk.config.Udp');

Global.IPv6 = false;
Global.stackLibType = Global.MIN;
Global.networkIPAddrHook = "&netIPAddrHook";

/* automatically call fdOpen/CloseSession for our sockets Task */
Global.autoOpenCloseFD = true;

Global.pktNumFrameBufs = 10;
Global.memRawPageCount = 6;
Global.ndkThreadStackSize = 1536;
Global.lowTaskStackSize = 1280;
Global.normTaskStackSize = 1024;
Global.highTaskStackSize = 1024;
Tcp.transmitBufSize = 1024;
Tcp.receiveBufSize = 1024;

Global.stackInitHook = '&DHCPTestHook';
Global.serviceReportHook = '&statusReportHook';

Also can this be resolved by increasing the heap size? And whats the limit for the heap size? Is there any documentation related to memory allocation and stuff which can help me understand the memory distribution as I don't have enough knowledge about it.

Regards,

Deepak