csdk: move OCEntityHandlerResponse from stack to heap
authorHauke Mehrtens <hauke@hauke-m.de>
Mon, 3 Oct 2016 19:00:28 +0000 (21:00 +0200)
committerZiran Sun <ziran.sun@samsung.com>
Mon, 30 Jan 2017 12:42:07 +0000 (12:42 +0000)
commit59fdcbe7c6267d544eb8d064b3d4640154eef80f
tree9e9046ca0f97afdf28e72d7117e32c3644993057
parent5f83471b5541736e031b30b3c62409d74e1bdb90
csdk: move OCEntityHandlerResponse from stack to heap

OCEntityHandlerResponse is over 50KByte and I got a stack overflow on MIPS
running on LEDE without this patch. Instead of storing
OCEntityHandlerResponse on the program stack, allocate some memory on
the heap and free it afterwards again.

This fixes one part of this issue for me:
https://jira.iotivity.org/browse/IOT-1374

Change-Id: I365a5c7a34dce2dfb0897a20b57a13ba566748ec
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Reviewed-on: https://gerrit.iotivity.org/gerrit/12729
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
resource/csdk/stack/src/ocresource.c