Hi everyone,
The bbclass is intentional. The main use case is for other recipes to inherit it and set a memory limit for their own service at build time. An .inc file would require an explicit require and manual wiring of the do_install postfunc in every recipe that uses the memory-control tool. The bbclass encapsulates that cleanly and follows the OE-Core pattern for cross-recipe functionality. The memory-control recipe itself is just the runtime companion, which the bbclass pulls in as an RDEPEND.
The motivation comes from embedded/constrained platforms, specifically OpenBMC, where per-service memory limits via cgroup v2 are a common requirement. Putting this in OE-Core makes it available to any layer without duplicating the implementation, and the pattern of baking systemd drop-ins at build time is broadly useful beyond any platform.
I'm committed to maintaining this recipe and bbclass going forward, and I've added myself to maintainers.inc. If the consensus is that this is too niche for OE-Core and belongs in a more specific layer, I'm open to that feedback.
Thanks,
Ishaan Desai