In other words, you are just admitting you were wrong, and don’t understand what you are talking about, or how the language you are trying to use works, in particular the semantics of “operator new” vs the new operator.
Sir, if You could allocate one single object on the heap i wouldn’t write You. I think You should know that with C++28 all Your problems are gone.
In other words, you LIE, as I can allocate a single object on the heap. You just don’t understand what you talk about.
Since C++28 doesn’t exist yet, only has proposals, you are just showing how little you understand reality.
This has been your problem for as long as you have been here, you have your own ideas of how things should be in your opinion, and refuse to understand how things actually are.
You always get me wrong sir. You’re right there is no C++28 yet. I’m sure this feature will become standard, You will see.
You’re also right You can allocate an object, operator new doesn’t allow handles and automated memory-management.
I really didn’t want to disturb You, please excuse me.
Good bye, thanks for Your time.
operator new doesn’t allow handles, as that isn’t its job.
I don’t “get you wrong”, the problem is you are just wrong as you don’t understand what you are talking about, but work in a bad approximation of reality.
It isn’t clear what “feature” you are looking for, that isn’t already available, unless the issue is you want a specific syntactic sugar. One problem with trying to talk about “handles” generically, is that there are so many variations on the theme that you need to define which one you are wanting to use.
I think i’m the most advanced C++ programmer in the world. ![]()
I have implemented comparison operators on my String-handle. Operator news job is to give me my handle, what is important when working with exceptions. If only this one restriction was removed. I’ve asked Cppcon for help on YouTube.
operator new CAN’T give you a handle, as that isn’t what its defined to do, it MUST give return the address of a block of memory suitable to construct an object in. It is the new operator that turns that into the object and return its address (do you understand the difference?)
You are perhaps one of the most IGNORANT C++ programmer, as you live in a false world of make-believe. It seems you don’t understand the most basic principles of design.
You my think you are advanced, but that is just the showing the Dunning-Kruger effect in you.
I see, i made a mistake. I mean the new operator as shown on godbolt.
How can You have doubt in my competence? I’ve written a whole operating system in C++. I’m not even using the standard-library anymore.
You mean the one that it flagged as an ERROR because it had the wrong signature?
All you are doing is proving you know nothing about what you talk.
I doubt your competence based on what you say, which shows your ignorance what you are talking about.
Is anyone doing anything useful with your “operating system”?
I suspect you aren’t using the standard-library as you don’t understand how to properly us it.
Sir, i had this idea for a database 20 years ago, playing with floppy disks. It took me years to implement my sorting algorithm in C++. Nothing special, a list and a map template. I’ve made a benchmark and found my pyramidal directories are half the size and three times faster. This is the reason i’m not using the standard-library anymore. Sure, i use std::forward and std::move, also some concepts.
I’ve tried to write a file-system driver for Windows, but they have structured exception handling in the kernel. I wanted to use C++. For Linux i couldn’t even find a documentation.
I found FreeRTOS when building a new thermal solar controller. I did exactly the same what You did and created some wrapper classes. I didn’t need much, for my list and my map i needed read/write locks and create_task. I guess You know FreeRTOS better than me, i couldn’t find a way for the read-lock. So i decided to implement these two functions myself.
My operating system is for me, to be able to test my database bare metal. I’m going to port it to Windows later and sell an app in the Microsoft store. If i ever make it, it is not that important. I work in electric industry and build electric control cabinets.
“It took me years to implement my sorting algorithm in C++”: Doesn’t sound like the work of an “Advanced C++ Programmer”.
“my pyramidal directories are half the size and three times faster”: I doubt it, more likely you weren’t using the standard ones correctly. If you have actually developed a faster general algorith, publish it in one of the peer-reviewed Computer Science Journals, and make yourself famous.
Your problems with Windows and Linux just point out your inability to understand documentation.
Read/Write Locks: While FreeRTOS doesn’t come with such a lock built in, it isn’t that hard to write one yourself, depending on need for things like Priority Inheretance. I’ve looked at some of the code you have tried to produce to do your semaphores, and it is just a mess. Not being able to figure out how to do it with FreeRTOS sounds like your typical level of work.
As to your “operating system”, have you done any performance testing? It is easy to build an OS that doesn’t need to be performant for a non-time critical application. Based on your past work, I suspect it isn’t really that good.
I wasn’t an advanced programmer back then. My sorting algorithm is public on GitHub, a header only implementation. Cppcon has confirmed my benchmark. It is cache-friendly what was never my plan.
Windows and Linux kernels are both C, i’m writing my database in C++. As a hobbyist i don’t need to follow all the restrictions.
For a read-lock i needed vMutexLockRead() which i couldn’t find. I simply implemented a write-lock with a semaphore. This just worked and was indeed not what i wanted.
My operating system is blinking a led on Raspberry Pi Pico 2W. The led is connected to the wifi-chip, i’m using PIO like in the pico-sdk. It is working, my task-monitor shows task percentage. Performance is not really an issue, because i do nothing special. Interrupt, task-switch, I/O and wait again.
My open source unwinder is really helpful, i can set a break-point in cxx_throw.
I visited Your GitHub-page, nothing new but the recursive mutex. In the pico-sdk even the critical section is recursive. When implementing my list template, i found i have to read-lock every get function, and write-lock every set. No recursion, a hint on over-complification.
Maybe You take a look at shared_list.hpp using list.hpp. These templates use the standard mutex and stdint for portability. That’s my original work, finally done after many years of studying.
Good night sir.
“Couldn’t Find” doesn’t mean can’t be easily written. It seems you aren’t really an advanced programmer even now.
Note, adding “recursion” to a mutex is actually fairly simple and low cost, so NOT a complication.
I guess if it isn’t handed to you on a silver platter, you figure it isn’t available.
The fact that the OSes are written in C doesn’t mean they don’t interface well with C++ code.
It seems you are admitting that you have no idea how efficient your OS is, and it could easily be just a hog.
Not all that I have written gets to the Git Hub page, as much of my work is proprietary, paid for and owned by the company I work for. To publish it to Git Hub, I need to apply for and get permission to share. I currently have a set of updates that need to finish clearing through review to let me release them.
Lucky You, You must have air conditioning in the office.
The WDK let me use C++ in the kernel, only exception handling is different. I didn’t like it, so i quit. The biggest problem is system calls, i want to use C++ templates. A flash_map to be precise. My operating system doesn’t have a kernel, no process isolation, i use it for development. The systemtimer is running at 100Hz, triggering the timer-task, scheduling. My task-monitor shows 99% idle, what is fine.
I also have a private editor not on GitHub. I’ve spent the last weekends on the main-menu, keyboard navigation and dark-mode. The framework is public however.
My shared_list is a good example how to not lock twice.
Your are showing your TOTAL IGNORANCE.
sizeof(String) BY DEFINITION returns the size of a object of type string, and is the same of all such objects as it just contains the memory directly reserved for object, and not any memory otherwised used by related objects that it points to.
Of course, since you are the poster child for Dunninbg-Kruger, this is just above your head and you stupidly think you are smarter than everyone else, when in fact you are just a danger to society as you promote out and out error.
Maybe you should go out and try to verify your claims. Like it is a FACT that the behavior of sizeof is fully defined by the language specifications , and not just by GNU or Microsoft. But then facts were never important to you.
Note, it can’t be “our” language you are talking about, as apparently you aren’t concerned about talking about the real language, which has a specification, but some lie of a language that you are making up in your head and pretending it is what everyone else is using. I use the official language, maybe with some documented extension (done knowingly). This seems to be something you just are too stupid to understand.
I’m not an ignorant sir, i’m just not interested in the current API anymore. Everything You say is just right, very good actually. But it is also right i’ve given my strings and tasks different sizes.
You think the standard is complete? Your good right sir, i don’t think so. There is a shared mutex in the ISO standard, and only there. Not in my world. We’re not sharing the mutex, we share the resource behind it. They should simply have added a lock(readonly) function to the mutex. Now we have lock templates what was not neccessary.
I see i’m a stranger, i’m really a lonely programmer in Germany. And i really learned the plural of mutex here, what makes Your talk kind of interesting. This way i can improve my skills.
Our language, C++ the language we are talking about is the API of FreeRTOS.
Hopefully You keep at least my heap, my shared_list and my shared_map. This code takes years to implement.
There can only be one handle-class in FreeRTOS, english is Your language. I can tell You it is impossible to work without handles. To be kind, there is always a workaround to finish the product.
This sizeof(str) function, nobody will ever call it in production. It should return the size on the heap.
I took a look again on sunday, my operating system really only is 97% idle. It’s free, why don’t You make a copy? Because of my workarounds? I had the same problem with task-creation somebody posted here in Your forum. You can now throw and then catch in a module. An empty application has about 70kB in debug mode. Also, there is zero configuration because it was confusing for me as a newbie.
One of Your people is following me on GitHub, really smart. My english is very limited, must look stupid.
I’ve been here to help You however. You don’t have any legal issues with my code, it is license-free for everybody who finds it useful.
Thanks god.