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.
One of the most basic rules for reliable embedded software is to AVOID dynamic memory allocation. See MISRA and others... For the less experienced programmer, when using malloc extensively, it is likely that at some point in time it will fail to allocate the large chunk of memory you need, because the memory pool is fragmented. When it fails, your code does not have much choice other than reset the system, otherwise it will continue to be impaired forever... In the light of the above, I cannot fathom why Keil, an ARM company, is making this basic mistake. I have tested this TCPNet rubbish a while ago with a simple tcp Connection exchanging data back and forth, and it locked up after less than one hour! The web server did not work much better either. If you look around at other proper implementations done by Segger, Express Logic, etc... you will see how it should be done. I have seen some people here complaining about alloc_mem() returning NULL. If you want a reliable IP stack look elsewhere. Keil does not have one.
Well, it's always good too see a product review of someone who are using their own name.
What has the name got to do with the review? Who cares what my name is and why? Why don't you talk about the content of the review itself? Why don't you say that it is all wrong, and you now better, etc... Mr Westermark, if that really is your name?
What has the name got to do with the review? EVERYTHING! if you are not willing to stand by your opinion(s) the go straight in the wastebasket.
Have a look at restaurant reviews, I can guarantee you that the "this is crap" review for a sushi place was from some first time visitor that just found out (s)he did not like sushi, not that the sushi was bad if that person is not anonymous, you can ask for clarification, if anonymous you have to guess. likewise the anaonymous review "the greatest palce" must likely was entered by the owner I have been chasticed for some of my opinions, but have never, in fear of criticism, hidden behind anonymity. I have a point to your post I would like clarified, but it is a waste to communicate with 'anonymous'
I have tested this TCPNet rubbish a while ago with a simple tcp Connection exchanging data back and forth, and it locked up after less than one hour!
I have also used TCPnet.
It certainly has it's quirks. It turned out not to be as fast as I'd expected.
But your finding is not something I noticed. I had multiple connections running continuously as part of stress testing for weeks on end and did not see a single error.
Maybe your code was less than perfect.
I fail to understand you fixation with names. Would you be more comfortable if I used George Clooney? Or Bruce Willis? How about Janis Magklunt? On the Internet only fools use their real name these days. You can quote me on that. What I stated is what I believe to be correct based on my experience and of others - using dynamic memory allocation for embedded projects is equivalent to asking for trouble, that unless your project is some sort of a toy or a demo that does not need to run more than 5 minutes at a time. If you were willing to have a technical discussion, but cannot get over a missing name, then that's your loss...
Please contact Keil support, if you have problems using TCPnet.
TCPNet using dynamic memory allocation is not necessarily a problem. Yes, it is bad practice to use dynamic memory allocation in embedded systems but... If TCPNet is the only module using dynamic memory and the memory management is well implemented and there are no "memory leaks" then it should not be a problem. Sooner or later all memory will be freed and returned to the pool and the fragmentation will be gone.
It all depends on how long/many TCPNet sockets etc are open before they are ALL closed, and how large the memory pool is. We use TCPNet in our products which are powered for 24/7 for several years and have never had a problem in this area ... yet.
And all generalisations are bad.
In general, generalisations are bad ;)
I certainly try and avoid it, here particularly because there is no registration or authentication, so no reason to suppose anyone is who they say they are.
I also don't see the problem with anonymous reviews, even for restaurants, with adequate context and reasoning the review can stand or fall on it's own merits.
Heck, if you use your real name my opinion might be coloured by the knowledge you are an Arrow FAE working in India, or something...
...coloured by the knowledge you are an Arrow FAE working in India, or something... I would like to raise an disagreement upon Pointing any specific geographical region name. The fact that Indians have launched the cheapest mission to Mars shows how technologically sound Indians might be _and Foreigners are not hired in India unlike other technologically advanced countries, who hire Indians_.
And i m purposely not using my real name currently (though i use it while posting in technical discussions).
For the less experienced programmer, when using malloc extensively, it is likely that at some point in time it will fail to allocate the large chunk of memory you need, because the memory pool is fragmented.
This can't be related to TCPnet as it doesn't use malloc as far as I can see this in my application. I btw didn't see any lock-up either. Keil's stack uses a dedicated packet buffer similar to the other products you mentioned. There is nothing bad about this. NetX does use fixed block sizes to allocate memory. Maybe this is what you actually meant? Using fixed block sizes vs. using variable size allocation is basically just the choice between speed (fixed) and memory usage (variable).