|
Wow.
You should write one article (or possibly many articles) on the argument.
I need to perceive full control, but a little scared of writing my own one.
"In testa che avete, Signor di Ceprano?"
-- Rigoletto
|
|
|
|
|
I always avoid it: my realtime stuff is always expected to run 24/365, so any heap fragmentation is a major problem. I allocate ram at init or preferably compilation, and it doesn't change from there, except for the stack obviously.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
That was I've done so far. However, systems are getting more complex...
Thank you.
"In testa che avete, Signor di Ceprano?"
-- Rigoletto
|
|
|
|
|
I've found that you can create robust systems that malloc just fine as long as you're careful.
I mean, I'm not saying you shouldn't avoid it, but used judiciously you can get away with it without having to worry that your code will crash a week in.
Basically, you allocate small amounts and throw them away quickly.
Then if you're really concerned you can profile to make sure you aren't leaking and have enough headroom, but in practice I don't even find I need to do that most of the time.
Edit: If you use common libraries like LVGL to provide a user interface for example, those will often malloc in the background.
To err is human. Fortune favors the monsters.
modified 26-Feb-23 4:55am.
|
|
|
|
|
If you have a memory controller or if your micro controller has a memory controller in it then yes. Because to use DRAM something has to be in charge of the refresh cycle(s).
That is if I understand your question properly.
|
|
|
|
|
I meant malloc/free (or new/delete). I'm dealing with SRAM-only microcontrollers.
Thank you.
"In testa che avete, Signor di Ceprano?"
-- Rigoletto
|
|
|
|
|
I just had a "High Sea" in a restaurant in the fishers town of Urk, a variation on "High Tea" which will probably raise eyebrows with English CodeProject members.
It was deliceous, with all kinds of fish accompanied by chips, I also had a glass of Sauvignon Blanc to flush it all away (my favourite however still remains Muscadet)
|
|
|
|
|
how high did the waves break over the table ?
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
|
|
|
|
|
We ended up at the sea bottom (name of the restaurant: "De Zeebodem")
|
|
|
|
|
RickZeeland wrote: which will probably raise eyebrows with English CodeProject members. With the dutch as well.
Can you not afford real meat?
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Well, they also had a "High meat" for the same (very reasonable) price, but as the dish was for 2 persons we had to choose. Next time we will go for the meat I think
|
|
|
|
|
High meat.
I'm thinking a pig that's stoned like a garnaal.
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
RickZeeland wrote: accompanied by chips
So long as it was proper chips[^] and not fries, or what Americans call "chips" that are actually crisps, then you're fine.
(Damnit, now you're making me hungry! )
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Actually it was a kind of chips I had not seen before, looked a bit like potato slices that were folded and then fried.
Maybe they had had an accident in the kitchen
|
|
|
|
|
(I've probably rant about this before, I have some time to learn new things)
Not the act of learning new technologies, that's always fun.
But I hate trying to find good and up to date (modern) documentation and tutorials, or tutorials that go from uber simple things to WTF did you just show ... there are missing steps that should probably be obvious, but no.
I also hate installing tools (yes, I'm talking to you SQL Server Express), that does not install.
Or downloading code that does not compile or use deprecated or obsolete frameworks
Also, I have no clue what the new technologies are, what is "cool" or what is in need right now; I know it depends on what I want to do and what the company wants me to do.
I'm many years in technical debts and I have a lot of catch up to do;
Thank you for attending my anti-TED talk.
CI/CD = Continuous Impediment/Continuous Despair
|
|
|
|
|
I totally agree.
The thing I find most annoying is that when you go looking for example code and you already have a basic understanding you find the SAME simple example code everywhere. No one seems to want to tackle a little bit more advanced subject.
|
|
|
|
|
There's a thin line between love and hate (famous Dutch saying)
|
|
|
|
|
I have been running as hard as I can to "Keep Up", since GW-Basic was Microsoft's only product. I have grown very tired of all aspects of it as well.
really old guy
|
|
|
|
|
Maximilien wrote: But I hate trying to find good and up to date (modern) documentation and tutorials, or tutorials that go from uber simple things to WTF did you just show ... there are missing steps that should probably be obvious, but no.
Yes, indeed! Quality of documentation went down the drain some time ago and it doesn't seem to have any uptrend. Maybe the CEOs fired all the technical writers in anticipation of ChatGPT doing the work for free. Open-source projects never had any technical writers and real programmers never write documentation. Blah!
Mircea
|
|
|
|
|
Even worse, there is a teacher over here at a local college who teaches that it is nonsense to write documentation as it will soon be expired!
Sadly we get new developers from that school who think that this is ok ...
|
|
|
|
|
Centuries of evolution are turning on their head. Imagine where we would have been if Newton would not have written Principia thinking Einstein will make it obsolete. Our whole civilization relied on writing down stuff that becomes obsolete. Now even writing as a whole take a step backwards: one of the most profound human inventions, the alphabetic writing (as opposed to hieroglyphic writing) is reversed by the use of emojis. Why write when we can draw a face? Back to the cave wall!
I sound like an old curmudgeon... wait, maybe that's what I am.
Mircea
|
|
|
|
|
Mircea Neacsu wrote: I sound like an old curmudgeon... wait, maybe that's what I am. I am not as old as you (I think), but I totally agree with you.
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
I totally agree. The written word is a powerful tool.
Pics are fine, but there are not worth the thousand words they used to be.
Emoji's are just a form of shorthand. Rubber stamps.
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
There's a bit of a furore here about the publisher "re-wording" much/most of Roald Dahl's childrens' books, to remove "offensive or discriminatory" language. On a morning TV news discussion today, a supporter of the move said "But the essence of the story remains the same". Sadly, "the essence" is not what makes a great book. The "essence" of Willy Wonka's chocolate factory is that boy from deprived background wins ticket to chocolate factory, has a great time. "He was an enormously fat boy" is not equivalent in meaning to "He was enormous".
These "essences" do not do justice to their originals. "Essence" is not what makes great writing. If the words and attitudes expressed cause offence, then take that as learning about the past; if you don't like it, don't read it.
One of the participants this morning was complaining about the James Bond novels, which I think most of us would agree include some rather racist and sexist views and language. She was up in arms about it, how it would affect younger readers and present these as acceptable attitudes. Then she shot herself in the foot by saying her teenage daughters read one of the books, and were falling about in hysterical laughter at the attitudes presented. They knew it described views that no-one can take seriously these days, and certainly didn't feel "objectified" by the words.
[Sorry, gone a bit off-topic here, but it did annoy me. Apparently the Roald Dahl publishers have now agreed to continue publishing the original version, along with an edited "PC" edition.]
|
|
|
|
|
The "essence" is the action. What happens, what this and that person (or whatever) is doing. Any "idea", any thought (beyond the level of "good vs. evil", which is anyway reflected in the actions) is inessential.
(An aside: Was your post really meant as a follow up to Mircea Neacsu's post? I do not see the connection. Did you intend it for another thread?)
|
|
|
|