HEAP size/heapless? #2314
-
Is it possible to run without usage of HEAP? this would be the only thing using heap in my application, and it would add some serious consideration. i was trying to test how fast i can write with something as (on a stm32f429zi baremetal)
I played around with different HEAP size and MG_IO_SIZE with different ms delays, but the throughput seems to be related on how fast i call mg_mgr_poll() rather than HEAP buffer size; edit: also i had to fix some missing include from the current release library, maybe i missed some setup step? I am not using the makefile but included in my app |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
You build, you write code, you control your heap size. Mongoose calls calloc(), it does need a heap unless you write your own. |
Beta Was this translation helpful? Give feedback.
-
thanks, that is a precious info, both to understand the maximum throughput in different configuration and HEAP usage About HEAP usage, i took a look at the raw TCP mode and my finding are the following: Eventually is there any interest to have such changes upstream, and if yes, what would be the preferred way to do it? |
Beta Was this translation helpful? Give feedback.
-
Perhaps you might want to go low-level and use You may send a PR if you want, though I personally don't think we would go that way. |
Beta Was this translation helpful? Give feedback.
You build, you write code, you control your heap size. Mongoose calls calloc(), it does need a heap unless you write your own.
You don't need to call any delay function, we don't do that in our tutorials nor in our examples. The timeout parameter in mg_mgr_poll() is only relevant when using an OS. Please use Mongoose as explained in our documentation, we don't do what you are doing. Please follow the guidelines in the documentation
If you have an issue, please open an issue, we don't have missing includes and I don't understand what is a "current release library"