Talk:Manual memory management

Latest comment: 2 years ago by 2A00:1028:8380:99E6:7806:B6CE:A3EF:78D in topic Bias?

Bias? edit

There is no information about techniques for manual memory management like memory arenas, scratch buffers ... This page basically strawmans by having two sides a) malloc/free , which is pain to dealt with in C and b) RAII/GC. — Preceding unsigned comment added by 2A00:1028:8380:99E6:7806:B6CE:A3EF:78D (talk) 19:53, 29 June 2021 (UTC)Reply

Date in first section edit

I wonder where this date comes from? Quote: "As of February 2006, however, languages with garbage collection are becoming increasingly popular;" 83.233.56.62 20:21, 20 March 2007 (UTC)Reply


Ambiguous wording in 1st section edit

The following

Up until the mid 1990s, the majority of programming languages used in industry supported manual memory management. Today, however, languages with garbage collection are becoming increasingly popular; the main manually-managed languages still in widespread use today are C and C++.

seems to hint that GC and manual-memory management (MM) can't coexist in the same language.

That's untrue. Languages like Ada and Modula3 support MM in "unsafe" modules. Manually-managed memory(or GCed one, depending on which is the default) is allocated in a separated heap and is handled with proper primitves (e.g. malloc&co). Broadly speaking, any language can have such low-level api. Most if not any of CommonLisp implementation provide the so-called "alien/foreign types" primitives ,see CFFI CFFI, "CFFI in SBCL" "SBCL Manual" and "Franz Inc." "Franz's Allegro CL FFI"

--151.47.208.114 (talk) 21:41, 12 July 2009 (UTC)Reply

System scarce resources and gratuitous reference to RAII edit

IMO the opportunity to ensure the disposal of system resources at object deallocation time can be beneficial independently from resources' scarcity, I'd remove the adjective "scarce".

I would not make any reference to RAII as well, for the following reasons:

- the feature being exploited is the possibility of defining destructors/finalizers, which is orthogonal to RAII, that is based on stack-allocation semantics instead.

- RAII implies to acquire resources at construction time. Finalisation is more general, it just ties the life-time of a resource-handle to the current owning object.

- RAII is a C++ term unused in other languages which still implement this or pretty similar techniques

--151.47.208.114 (talk) 21:41, 12 July 2009 (UTC)Reply