Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. One thing I think is missing from the C and C++ standard libraries

One thing I think is missing from the C and C++ standard libraries

Scheduled Pinned Locked Moved The Lounge
c++designhardwarecomgraphics
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    honey the codewitch
    wrote on last edited by
    #1

    After all these years and additions to the languages you'd think they'd have provided builtins to solve one of the major things many non-trivial projects wind up needing: Custom heaps. Nothing terribly fancy, just fast lookaside lists behind and API and such to manage heap allocations and frees, but on subheaps. Maybe even some hooks in it so you can allocate your memory from the hardware your own way, IDK. The STL is so irresponsible by default that it's a non-starter on embedded. You can't just alloc every time you need a functor. It's expensive, and the heap frag struggle is real. If you had subheaps you could just wrap one with custom allocators, allocate a block up front, and then let the STL allocate your functors from that. Sure you can roll your own, and there are probably 100 implementations on github, but it feels like it should be intrinsic to the runtimes.

    Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups