First language with C-like memory management
Clash Royale CLAN TAG#URR8PPP
up vote
3
down vote
favorite
This is a nerd question but I can’t find anything in google. So, in which programming language did the classical memory management system first be implemented?
I mean the division into value types (ordinary Int, Bool, etc.) and reference types, for which we must use alloc / malloc to initialize and free to free up memory in C (as I heard it is called heap). I called it a classic, because I met this approach in many other languages ​​and thought it was almost a standard. But it became interesting to me in which languages ​​this mechanism was implemented for the first time, or maybe it completely depends on the type of OS. I'm not sure that in some integral BASIC, for example, was something like that.
history programming
New contributor
Matvey Malatsion is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
 |Â
show 2 more comments
up vote
3
down vote
favorite
This is a nerd question but I can’t find anything in google. So, in which programming language did the classical memory management system first be implemented?
I mean the division into value types (ordinary Int, Bool, etc.) and reference types, for which we must use alloc / malloc to initialize and free to free up memory in C (as I heard it is called heap). I called it a classic, because I met this approach in many other languages ​​and thought it was almost a standard. But it became interesting to me in which languages ​​this mechanism was implemented for the first time, or maybe it completely depends on the type of OS. I'm not sure that in some integral BASIC, for example, was something like that.
history programming
New contributor
Matvey Malatsion is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Mind to explain what you considere a 'classic memory management'? A Stack is not neccessarry static, not a Heap dynamic in fact, a dynamic heap is rather uncomon. Which in turn may require you to define the meaning of Heap and Stack as well as Dynamic and Static, as when it comes to early developements, names may have been way different then what we call it nowadays (or assume so).
– Raffzahn
2 hours ago
@Raffzahn Sorry for the confusion with the terms. I mean memory management methods similar to those in C.
– Matvey Malatsion
2 hours ago
And which, in C, do you refer to? To make this useful a clear desctiption instead of implied asumptions may be helpful.
– Raffzahn
2 hours ago
1
Now your question boils down to: "Which programming language first implemented memory management as C did?" - The answer is maybe a bit too obvious ;) I have some ideas where you might be going, but you may need to put a bit more effort into your question. The way it's put now, the simple answer is "C was the first language to implement C memory management"
– tofro
2 hours ago
@Raffzahn Ok, I mean the division into value types (ordinary Int, Bool, etc.) and reference types, for which we must use alloc / malloc to initialize and free to free up memory in C (as I heard it is called heap) . I called it a classic, because I met this approach in many other languages ​​and thought it was almost a standard. But it became interesting to me in which languages ​​this mechanism was implemented for the first time, or maybe it completely depends on the type of OS. I'm not sure that in some integral BASIC, for example, was something like that.
– Matvey Malatsion
2 hours ago
 |Â
show 2 more comments
up vote
3
down vote
favorite
up vote
3
down vote
favorite
This is a nerd question but I can’t find anything in google. So, in which programming language did the classical memory management system first be implemented?
I mean the division into value types (ordinary Int, Bool, etc.) and reference types, for which we must use alloc / malloc to initialize and free to free up memory in C (as I heard it is called heap). I called it a classic, because I met this approach in many other languages ​​and thought it was almost a standard. But it became interesting to me in which languages ​​this mechanism was implemented for the first time, or maybe it completely depends on the type of OS. I'm not sure that in some integral BASIC, for example, was something like that.
history programming
New contributor
Matvey Malatsion is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
This is a nerd question but I can’t find anything in google. So, in which programming language did the classical memory management system first be implemented?
I mean the division into value types (ordinary Int, Bool, etc.) and reference types, for which we must use alloc / malloc to initialize and free to free up memory in C (as I heard it is called heap). I called it a classic, because I met this approach in many other languages ​​and thought it was almost a standard. But it became interesting to me in which languages ​​this mechanism was implemented for the first time, or maybe it completely depends on the type of OS. I'm not sure that in some integral BASIC, for example, was something like that.
history programming
history programming
New contributor
Matvey Malatsion is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Matvey Malatsion is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 2 hours ago
New contributor
Matvey Malatsion is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 2 hours ago
Matvey Malatsion
183
183
New contributor
Matvey Malatsion is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Matvey Malatsion is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Matvey Malatsion is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Mind to explain what you considere a 'classic memory management'? A Stack is not neccessarry static, not a Heap dynamic in fact, a dynamic heap is rather uncomon. Which in turn may require you to define the meaning of Heap and Stack as well as Dynamic and Static, as when it comes to early developements, names may have been way different then what we call it nowadays (or assume so).
– Raffzahn
2 hours ago
@Raffzahn Sorry for the confusion with the terms. I mean memory management methods similar to those in C.
– Matvey Malatsion
2 hours ago
And which, in C, do you refer to? To make this useful a clear desctiption instead of implied asumptions may be helpful.
– Raffzahn
2 hours ago
1
Now your question boils down to: "Which programming language first implemented memory management as C did?" - The answer is maybe a bit too obvious ;) I have some ideas where you might be going, but you may need to put a bit more effort into your question. The way it's put now, the simple answer is "C was the first language to implement C memory management"
– tofro
2 hours ago
@Raffzahn Ok, I mean the division into value types (ordinary Int, Bool, etc.) and reference types, for which we must use alloc / malloc to initialize and free to free up memory in C (as I heard it is called heap) . I called it a classic, because I met this approach in many other languages ​​and thought it was almost a standard. But it became interesting to me in which languages ​​this mechanism was implemented for the first time, or maybe it completely depends on the type of OS. I'm not sure that in some integral BASIC, for example, was something like that.
– Matvey Malatsion
2 hours ago
 |Â
show 2 more comments
Mind to explain what you considere a 'classic memory management'? A Stack is not neccessarry static, not a Heap dynamic in fact, a dynamic heap is rather uncomon. Which in turn may require you to define the meaning of Heap and Stack as well as Dynamic and Static, as when it comes to early developements, names may have been way different then what we call it nowadays (or assume so).
– Raffzahn
2 hours ago
@Raffzahn Sorry for the confusion with the terms. I mean memory management methods similar to those in C.
– Matvey Malatsion
2 hours ago
And which, in C, do you refer to? To make this useful a clear desctiption instead of implied asumptions may be helpful.
– Raffzahn
2 hours ago
1
Now your question boils down to: "Which programming language first implemented memory management as C did?" - The answer is maybe a bit too obvious ;) I have some ideas where you might be going, but you may need to put a bit more effort into your question. The way it's put now, the simple answer is "C was the first language to implement C memory management"
– tofro
2 hours ago
@Raffzahn Ok, I mean the division into value types (ordinary Int, Bool, etc.) and reference types, for which we must use alloc / malloc to initialize and free to free up memory in C (as I heard it is called heap) . I called it a classic, because I met this approach in many other languages ​​and thought it was almost a standard. But it became interesting to me in which languages ​​this mechanism was implemented for the first time, or maybe it completely depends on the type of OS. I'm not sure that in some integral BASIC, for example, was something like that.
– Matvey Malatsion
2 hours ago
Mind to explain what you considere a 'classic memory management'? A Stack is not neccessarry static, not a Heap dynamic in fact, a dynamic heap is rather uncomon. Which in turn may require you to define the meaning of Heap and Stack as well as Dynamic and Static, as when it comes to early developements, names may have been way different then what we call it nowadays (or assume so).
– Raffzahn
2 hours ago
Mind to explain what you considere a 'classic memory management'? A Stack is not neccessarry static, not a Heap dynamic in fact, a dynamic heap is rather uncomon. Which in turn may require you to define the meaning of Heap and Stack as well as Dynamic and Static, as when it comes to early developements, names may have been way different then what we call it nowadays (or assume so).
– Raffzahn
2 hours ago
@Raffzahn Sorry for the confusion with the terms. I mean memory management methods similar to those in C.
– Matvey Malatsion
2 hours ago
@Raffzahn Sorry for the confusion with the terms. I mean memory management methods similar to those in C.
– Matvey Malatsion
2 hours ago
And which, in C, do you refer to? To make this useful a clear desctiption instead of implied asumptions may be helpful.
– Raffzahn
2 hours ago
And which, in C, do you refer to? To make this useful a clear desctiption instead of implied asumptions may be helpful.
– Raffzahn
2 hours ago
1
1
Now your question boils down to: "Which programming language first implemented memory management as C did?" - The answer is maybe a bit too obvious ;) I have some ideas where you might be going, but you may need to put a bit more effort into your question. The way it's put now, the simple answer is "C was the first language to implement C memory management"
– tofro
2 hours ago
Now your question boils down to: "Which programming language first implemented memory management as C did?" - The answer is maybe a bit too obvious ;) I have some ideas where you might be going, but you may need to put a bit more effort into your question. The way it's put now, the simple answer is "C was the first language to implement C memory management"
– tofro
2 hours ago
@Raffzahn Ok, I mean the division into value types (ordinary Int, Bool, etc.) and reference types, for which we must use alloc / malloc to initialize and free to free up memory in C (as I heard it is called heap) . I called it a classic, because I met this approach in many other languages ​​and thought it was almost a standard. But it became interesting to me in which languages ​​this mechanism was implemented for the first time, or maybe it completely depends on the type of OS. I'm not sure that in some integral BASIC, for example, was something like that.
– Matvey Malatsion
2 hours ago
@Raffzahn Ok, I mean the division into value types (ordinary Int, Bool, etc.) and reference types, for which we must use alloc / malloc to initialize and free to free up memory in C (as I heard it is called heap) . I called it a classic, because I met this approach in many other languages ​​and thought it was almost a standard. But it became interesting to me in which languages ​​this mechanism was implemented for the first time, or maybe it completely depends on the type of OS. I'm not sure that in some integral BASIC, for example, was something like that.
– Matvey Malatsion
2 hours ago
 |Â
show 2 more comments
1 Answer
1
active
oldest
votes
up vote
5
down vote
accepted
Stack
At least for the Stack as used for subroutine handling (return address as well as parameter passing and local variables) ZMMD might be the first.
Bauer and Samelson, at the University of Munich started building a Compiler using the recent 'invented' stack principle in 1955 for the PERM, a back then tube computer. The stack principle was not only used to manage subroutines, but also as a method to compile the source code. This led in 1956 to a cooperation between the Universities of Zurich, Munich, Mainz and Darmstadt (hence the name). The idea was to create a language that could be used to compile programs vor various machines from a single source.
In 1958 this led to an ACM conference in Zurich, where the concept was formalized and agreed as a standard called International Algebraic Language (IAL), later to be known als ALGOL-58.
First implementations where made for
ERMETH (Zurich)
PERM (Munich)
Zuse Z22 (Mainz)
Siemens 2002 (Mainz)
DERA (Darmstadt)
IBM 650 (Darmstadt)
In fact, for the Zuse Algol became somewhat like BASIC on later home computers, as it stayed true to the idea of not using binary code, but compile at execution. The Z23 (transistorized version of the Z22) was delivered by default with an Algol compiler as part of the OS memory (Drum). Programs to be executed where loaded from external memory (punch card, punch tape, magnetic tape) and compiled each time they got used.
Algol is often named the first 'modern' language. C is a true decendant of Algol with it's change of keywords into symbols and some hardware specific add ons as most notable difference.
Heap
Memory management like the C heap, is something that was also envisioned with Algol, but not implemented, as the very first machines simply hadn't enough memory available to make frivolous use of precicious global memory :)) But it did allow to allocate dynamic stack memory at runtime (*1).
This changed dramaticly during the early 1960s, as computers switched from drums to core - and core in huge sizes, sometimes 64 KiB and more :)
PL/1 might be the first, at least the first major language to implement a heap management. It got introduced in 1966 with IBMs PL/1 for the /360 (*2). Algol added support for dynamic allocation about the same time, officialy with it's Algol-68 standard, where also a heap
keyword was added to allocate heap memory for a struture (*3).
Fun fact for C: There is next to no C programm without ASCIIs backslash () character, but it was Algol that made ANSI to introduce it to its September 1961 version, so the special Algol operators
∧
(AND) and ∨
(OR) could be spelled using a digraph of ASCII characters (/
, /
) - not to mention that C, as Algol's grandchild, did support them in addition to &
/|
. At least in early versions.
Which in turn shows why Unicode is such a great idea, as it gave back all the great mathematical operators early programing languages used, uncluding Ac and Vel.
*1 - This did not only go well with it's creators idea of a nicely nested programm and data structure, but also was highly efficient and provided automatic garbage collection. Everything allocated on stack was automatic cleaned by leaving a procedure. So any need for dynamic memory was satisfied from the stack, due this nature only accessible to code on the same or lower level of nesting, and automatic cleaned when leaving.
After all, heap is as evil as any other global variable, isn't it?
*2 - An early example how bloaty software developed by comitee can be - to fit the compiler into back then well suited 64 KiB machines, it had to be split into almost 100 overlays swaped in during a single compile run.
*3 - Unlike next to all of its offsprings Algol could allocate dynamic runtime memory from the stack as well as from a heap.
REF ASTRUCT foo = LOC ASTRUCT;
allocats an ASTRUCT size chunk on the (local) stack, while
REF ASTRUCT foo = HEAP ASTRUCT;
requests a similar one from the (global) heap.
There was only one heap. Allocation from user pools wasn't suported (as always it could be handled as some kind of array of structures by the program itself).
Perfect! Thank you so much!
– Matvey Malatsion
2 hours ago
The S/360 architecture didn't have a stack in the modern sense of the word (for example there was no stack pointer register) but PL/I did use chained "data frames" for local variables within subroutines. Confusingly by modern conventions, the S/360 assembler POP and PUSH instructions were assembler directives which saved and restored the assembler's controls for things like printed or punched-card output, rather than being part of the code being assembled!
– alephzero
4 mins ago
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
accepted
Stack
At least for the Stack as used for subroutine handling (return address as well as parameter passing and local variables) ZMMD might be the first.
Bauer and Samelson, at the University of Munich started building a Compiler using the recent 'invented' stack principle in 1955 for the PERM, a back then tube computer. The stack principle was not only used to manage subroutines, but also as a method to compile the source code. This led in 1956 to a cooperation between the Universities of Zurich, Munich, Mainz and Darmstadt (hence the name). The idea was to create a language that could be used to compile programs vor various machines from a single source.
In 1958 this led to an ACM conference in Zurich, where the concept was formalized and agreed as a standard called International Algebraic Language (IAL), later to be known als ALGOL-58.
First implementations where made for
ERMETH (Zurich)
PERM (Munich)
Zuse Z22 (Mainz)
Siemens 2002 (Mainz)
DERA (Darmstadt)
IBM 650 (Darmstadt)
In fact, for the Zuse Algol became somewhat like BASIC on later home computers, as it stayed true to the idea of not using binary code, but compile at execution. The Z23 (transistorized version of the Z22) was delivered by default with an Algol compiler as part of the OS memory (Drum). Programs to be executed where loaded from external memory (punch card, punch tape, magnetic tape) and compiled each time they got used.
Algol is often named the first 'modern' language. C is a true decendant of Algol with it's change of keywords into symbols and some hardware specific add ons as most notable difference.
Heap
Memory management like the C heap, is something that was also envisioned with Algol, but not implemented, as the very first machines simply hadn't enough memory available to make frivolous use of precicious global memory :)) But it did allow to allocate dynamic stack memory at runtime (*1).
This changed dramaticly during the early 1960s, as computers switched from drums to core - and core in huge sizes, sometimes 64 KiB and more :)
PL/1 might be the first, at least the first major language to implement a heap management. It got introduced in 1966 with IBMs PL/1 for the /360 (*2). Algol added support for dynamic allocation about the same time, officialy with it's Algol-68 standard, where also a heap
keyword was added to allocate heap memory for a struture (*3).
Fun fact for C: There is next to no C programm without ASCIIs backslash () character, but it was Algol that made ANSI to introduce it to its September 1961 version, so the special Algol operators
∧
(AND) and ∨
(OR) could be spelled using a digraph of ASCII characters (/
, /
) - not to mention that C, as Algol's grandchild, did support them in addition to &
/|
. At least in early versions.
Which in turn shows why Unicode is such a great idea, as it gave back all the great mathematical operators early programing languages used, uncluding Ac and Vel.
*1 - This did not only go well with it's creators idea of a nicely nested programm and data structure, but also was highly efficient and provided automatic garbage collection. Everything allocated on stack was automatic cleaned by leaving a procedure. So any need for dynamic memory was satisfied from the stack, due this nature only accessible to code on the same or lower level of nesting, and automatic cleaned when leaving.
After all, heap is as evil as any other global variable, isn't it?
*2 - An early example how bloaty software developed by comitee can be - to fit the compiler into back then well suited 64 KiB machines, it had to be split into almost 100 overlays swaped in during a single compile run.
*3 - Unlike next to all of its offsprings Algol could allocate dynamic runtime memory from the stack as well as from a heap.
REF ASTRUCT foo = LOC ASTRUCT;
allocats an ASTRUCT size chunk on the (local) stack, while
REF ASTRUCT foo = HEAP ASTRUCT;
requests a similar one from the (global) heap.
There was only one heap. Allocation from user pools wasn't suported (as always it could be handled as some kind of array of structures by the program itself).
Perfect! Thank you so much!
– Matvey Malatsion
2 hours ago
The S/360 architecture didn't have a stack in the modern sense of the word (for example there was no stack pointer register) but PL/I did use chained "data frames" for local variables within subroutines. Confusingly by modern conventions, the S/360 assembler POP and PUSH instructions were assembler directives which saved and restored the assembler's controls for things like printed or punched-card output, rather than being part of the code being assembled!
– alephzero
4 mins ago
add a comment |Â
up vote
5
down vote
accepted
Stack
At least for the Stack as used for subroutine handling (return address as well as parameter passing and local variables) ZMMD might be the first.
Bauer and Samelson, at the University of Munich started building a Compiler using the recent 'invented' stack principle in 1955 for the PERM, a back then tube computer. The stack principle was not only used to manage subroutines, but also as a method to compile the source code. This led in 1956 to a cooperation between the Universities of Zurich, Munich, Mainz and Darmstadt (hence the name). The idea was to create a language that could be used to compile programs vor various machines from a single source.
In 1958 this led to an ACM conference in Zurich, where the concept was formalized and agreed as a standard called International Algebraic Language (IAL), later to be known als ALGOL-58.
First implementations where made for
ERMETH (Zurich)
PERM (Munich)
Zuse Z22 (Mainz)
Siemens 2002 (Mainz)
DERA (Darmstadt)
IBM 650 (Darmstadt)
In fact, for the Zuse Algol became somewhat like BASIC on later home computers, as it stayed true to the idea of not using binary code, but compile at execution. The Z23 (transistorized version of the Z22) was delivered by default with an Algol compiler as part of the OS memory (Drum). Programs to be executed where loaded from external memory (punch card, punch tape, magnetic tape) and compiled each time they got used.
Algol is often named the first 'modern' language. C is a true decendant of Algol with it's change of keywords into symbols and some hardware specific add ons as most notable difference.
Heap
Memory management like the C heap, is something that was also envisioned with Algol, but not implemented, as the very first machines simply hadn't enough memory available to make frivolous use of precicious global memory :)) But it did allow to allocate dynamic stack memory at runtime (*1).
This changed dramaticly during the early 1960s, as computers switched from drums to core - and core in huge sizes, sometimes 64 KiB and more :)
PL/1 might be the first, at least the first major language to implement a heap management. It got introduced in 1966 with IBMs PL/1 for the /360 (*2). Algol added support for dynamic allocation about the same time, officialy with it's Algol-68 standard, where also a heap
keyword was added to allocate heap memory for a struture (*3).
Fun fact for C: There is next to no C programm without ASCIIs backslash () character, but it was Algol that made ANSI to introduce it to its September 1961 version, so the special Algol operators
∧
(AND) and ∨
(OR) could be spelled using a digraph of ASCII characters (/
, /
) - not to mention that C, as Algol's grandchild, did support them in addition to &
/|
. At least in early versions.
Which in turn shows why Unicode is such a great idea, as it gave back all the great mathematical operators early programing languages used, uncluding Ac and Vel.
*1 - This did not only go well with it's creators idea of a nicely nested programm and data structure, but also was highly efficient and provided automatic garbage collection. Everything allocated on stack was automatic cleaned by leaving a procedure. So any need for dynamic memory was satisfied from the stack, due this nature only accessible to code on the same or lower level of nesting, and automatic cleaned when leaving.
After all, heap is as evil as any other global variable, isn't it?
*2 - An early example how bloaty software developed by comitee can be - to fit the compiler into back then well suited 64 KiB machines, it had to be split into almost 100 overlays swaped in during a single compile run.
*3 - Unlike next to all of its offsprings Algol could allocate dynamic runtime memory from the stack as well as from a heap.
REF ASTRUCT foo = LOC ASTRUCT;
allocats an ASTRUCT size chunk on the (local) stack, while
REF ASTRUCT foo = HEAP ASTRUCT;
requests a similar one from the (global) heap.
There was only one heap. Allocation from user pools wasn't suported (as always it could be handled as some kind of array of structures by the program itself).
Perfect! Thank you so much!
– Matvey Malatsion
2 hours ago
The S/360 architecture didn't have a stack in the modern sense of the word (for example there was no stack pointer register) but PL/I did use chained "data frames" for local variables within subroutines. Confusingly by modern conventions, the S/360 assembler POP and PUSH instructions were assembler directives which saved and restored the assembler's controls for things like printed or punched-card output, rather than being part of the code being assembled!
– alephzero
4 mins ago
add a comment |Â
up vote
5
down vote
accepted
up vote
5
down vote
accepted
Stack
At least for the Stack as used for subroutine handling (return address as well as parameter passing and local variables) ZMMD might be the first.
Bauer and Samelson, at the University of Munich started building a Compiler using the recent 'invented' stack principle in 1955 for the PERM, a back then tube computer. The stack principle was not only used to manage subroutines, but also as a method to compile the source code. This led in 1956 to a cooperation between the Universities of Zurich, Munich, Mainz and Darmstadt (hence the name). The idea was to create a language that could be used to compile programs vor various machines from a single source.
In 1958 this led to an ACM conference in Zurich, where the concept was formalized and agreed as a standard called International Algebraic Language (IAL), later to be known als ALGOL-58.
First implementations where made for
ERMETH (Zurich)
PERM (Munich)
Zuse Z22 (Mainz)
Siemens 2002 (Mainz)
DERA (Darmstadt)
IBM 650 (Darmstadt)
In fact, for the Zuse Algol became somewhat like BASIC on later home computers, as it stayed true to the idea of not using binary code, but compile at execution. The Z23 (transistorized version of the Z22) was delivered by default with an Algol compiler as part of the OS memory (Drum). Programs to be executed where loaded from external memory (punch card, punch tape, magnetic tape) and compiled each time they got used.
Algol is often named the first 'modern' language. C is a true decendant of Algol with it's change of keywords into symbols and some hardware specific add ons as most notable difference.
Heap
Memory management like the C heap, is something that was also envisioned with Algol, but not implemented, as the very first machines simply hadn't enough memory available to make frivolous use of precicious global memory :)) But it did allow to allocate dynamic stack memory at runtime (*1).
This changed dramaticly during the early 1960s, as computers switched from drums to core - and core in huge sizes, sometimes 64 KiB and more :)
PL/1 might be the first, at least the first major language to implement a heap management. It got introduced in 1966 with IBMs PL/1 for the /360 (*2). Algol added support for dynamic allocation about the same time, officialy with it's Algol-68 standard, where also a heap
keyword was added to allocate heap memory for a struture (*3).
Fun fact for C: There is next to no C programm without ASCIIs backslash () character, but it was Algol that made ANSI to introduce it to its September 1961 version, so the special Algol operators
∧
(AND) and ∨
(OR) could be spelled using a digraph of ASCII characters (/
, /
) - not to mention that C, as Algol's grandchild, did support them in addition to &
/|
. At least in early versions.
Which in turn shows why Unicode is such a great idea, as it gave back all the great mathematical operators early programing languages used, uncluding Ac and Vel.
*1 - This did not only go well with it's creators idea of a nicely nested programm and data structure, but also was highly efficient and provided automatic garbage collection. Everything allocated on stack was automatic cleaned by leaving a procedure. So any need for dynamic memory was satisfied from the stack, due this nature only accessible to code on the same or lower level of nesting, and automatic cleaned when leaving.
After all, heap is as evil as any other global variable, isn't it?
*2 - An early example how bloaty software developed by comitee can be - to fit the compiler into back then well suited 64 KiB machines, it had to be split into almost 100 overlays swaped in during a single compile run.
*3 - Unlike next to all of its offsprings Algol could allocate dynamic runtime memory from the stack as well as from a heap.
REF ASTRUCT foo = LOC ASTRUCT;
allocats an ASTRUCT size chunk on the (local) stack, while
REF ASTRUCT foo = HEAP ASTRUCT;
requests a similar one from the (global) heap.
There was only one heap. Allocation from user pools wasn't suported (as always it could be handled as some kind of array of structures by the program itself).
Stack
At least for the Stack as used for subroutine handling (return address as well as parameter passing and local variables) ZMMD might be the first.
Bauer and Samelson, at the University of Munich started building a Compiler using the recent 'invented' stack principle in 1955 for the PERM, a back then tube computer. The stack principle was not only used to manage subroutines, but also as a method to compile the source code. This led in 1956 to a cooperation between the Universities of Zurich, Munich, Mainz and Darmstadt (hence the name). The idea was to create a language that could be used to compile programs vor various machines from a single source.
In 1958 this led to an ACM conference in Zurich, where the concept was formalized and agreed as a standard called International Algebraic Language (IAL), later to be known als ALGOL-58.
First implementations where made for
ERMETH (Zurich)
PERM (Munich)
Zuse Z22 (Mainz)
Siemens 2002 (Mainz)
DERA (Darmstadt)
IBM 650 (Darmstadt)
In fact, for the Zuse Algol became somewhat like BASIC on later home computers, as it stayed true to the idea of not using binary code, but compile at execution. The Z23 (transistorized version of the Z22) was delivered by default with an Algol compiler as part of the OS memory (Drum). Programs to be executed where loaded from external memory (punch card, punch tape, magnetic tape) and compiled each time they got used.
Algol is often named the first 'modern' language. C is a true decendant of Algol with it's change of keywords into symbols and some hardware specific add ons as most notable difference.
Heap
Memory management like the C heap, is something that was also envisioned with Algol, but not implemented, as the very first machines simply hadn't enough memory available to make frivolous use of precicious global memory :)) But it did allow to allocate dynamic stack memory at runtime (*1).
This changed dramaticly during the early 1960s, as computers switched from drums to core - and core in huge sizes, sometimes 64 KiB and more :)
PL/1 might be the first, at least the first major language to implement a heap management. It got introduced in 1966 with IBMs PL/1 for the /360 (*2). Algol added support for dynamic allocation about the same time, officialy with it's Algol-68 standard, where also a heap
keyword was added to allocate heap memory for a struture (*3).
Fun fact for C: There is next to no C programm without ASCIIs backslash () character, but it was Algol that made ANSI to introduce it to its September 1961 version, so the special Algol operators
∧
(AND) and ∨
(OR) could be spelled using a digraph of ASCII characters (/
, /
) - not to mention that C, as Algol's grandchild, did support them in addition to &
/|
. At least in early versions.
Which in turn shows why Unicode is such a great idea, as it gave back all the great mathematical operators early programing languages used, uncluding Ac and Vel.
*1 - This did not only go well with it's creators idea of a nicely nested programm and data structure, but also was highly efficient and provided automatic garbage collection. Everything allocated on stack was automatic cleaned by leaving a procedure. So any need for dynamic memory was satisfied from the stack, due this nature only accessible to code on the same or lower level of nesting, and automatic cleaned when leaving.
After all, heap is as evil as any other global variable, isn't it?
*2 - An early example how bloaty software developed by comitee can be - to fit the compiler into back then well suited 64 KiB machines, it had to be split into almost 100 overlays swaped in during a single compile run.
*3 - Unlike next to all of its offsprings Algol could allocate dynamic runtime memory from the stack as well as from a heap.
REF ASTRUCT foo = LOC ASTRUCT;
allocats an ASTRUCT size chunk on the (local) stack, while
REF ASTRUCT foo = HEAP ASTRUCT;
requests a similar one from the (global) heap.
There was only one heap. Allocation from user pools wasn't suported (as always it could be handled as some kind of array of structures by the program itself).
edited 46 mins ago
answered 2 hours ago


Raffzahn
37.5k483149
37.5k483149
Perfect! Thank you so much!
– Matvey Malatsion
2 hours ago
The S/360 architecture didn't have a stack in the modern sense of the word (for example there was no stack pointer register) but PL/I did use chained "data frames" for local variables within subroutines. Confusingly by modern conventions, the S/360 assembler POP and PUSH instructions were assembler directives which saved and restored the assembler's controls for things like printed or punched-card output, rather than being part of the code being assembled!
– alephzero
4 mins ago
add a comment |Â
Perfect! Thank you so much!
– Matvey Malatsion
2 hours ago
The S/360 architecture didn't have a stack in the modern sense of the word (for example there was no stack pointer register) but PL/I did use chained "data frames" for local variables within subroutines. Confusingly by modern conventions, the S/360 assembler POP and PUSH instructions were assembler directives which saved and restored the assembler's controls for things like printed or punched-card output, rather than being part of the code being assembled!
– alephzero
4 mins ago
Perfect! Thank you so much!
– Matvey Malatsion
2 hours ago
Perfect! Thank you so much!
– Matvey Malatsion
2 hours ago
The S/360 architecture didn't have a stack in the modern sense of the word (for example there was no stack pointer register) but PL/I did use chained "data frames" for local variables within subroutines. Confusingly by modern conventions, the S/360 assembler POP and PUSH instructions were assembler directives which saved and restored the assembler's controls for things like printed or punched-card output, rather than being part of the code being assembled!
– alephzero
4 mins ago
The S/360 architecture didn't have a stack in the modern sense of the word (for example there was no stack pointer register) but PL/I did use chained "data frames" for local variables within subroutines. Confusingly by modern conventions, the S/360 assembler POP and PUSH instructions were assembler directives which saved and restored the assembler's controls for things like printed or punched-card output, rather than being part of the code being assembled!
– alephzero
4 mins ago
add a comment |Â
Matvey Malatsion is a new contributor. Be nice, and check out our Code of Conduct.
Matvey Malatsion is a new contributor. Be nice, and check out our Code of Conduct.
Matvey Malatsion is a new contributor. Be nice, and check out our Code of Conduct.
Matvey Malatsion is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fretrocomputing.stackexchange.com%2fquestions%2f7953%2ffirst-language-with-c-like-memory-management%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Mind to explain what you considere a 'classic memory management'? A Stack is not neccessarry static, not a Heap dynamic in fact, a dynamic heap is rather uncomon. Which in turn may require you to define the meaning of Heap and Stack as well as Dynamic and Static, as when it comes to early developements, names may have been way different then what we call it nowadays (or assume so).
– Raffzahn
2 hours ago
@Raffzahn Sorry for the confusion with the terms. I mean memory management methods similar to those in C.
– Matvey Malatsion
2 hours ago
And which, in C, do you refer to? To make this useful a clear desctiption instead of implied asumptions may be helpful.
– Raffzahn
2 hours ago
1
Now your question boils down to: "Which programming language first implemented memory management as C did?" - The answer is maybe a bit too obvious ;) I have some ideas where you might be going, but you may need to put a bit more effort into your question. The way it's put now, the simple answer is "C was the first language to implement C memory management"
– tofro
2 hours ago
@Raffzahn Ok, I mean the division into value types (ordinary Int, Bool, etc.) and reference types, for which we must use alloc / malloc to initialize and free to free up memory in C (as I heard it is called heap) . I called it a classic, because I met this approach in many other languages ​​and thought it was almost a standard. But it became interesting to me in which languages ​​this mechanism was implemented for the first time, or maybe it completely depends on the type of OS. I'm not sure that in some integral BASIC, for example, was something like that.
– Matvey Malatsion
2 hours ago