Many times I have met the statement that standard malloc is slow and which is not suitable for permanent use.

Now I'm trying to write a small scripting language in C, where automatic memory management (GC) will be.

How do you spell GC? What literature advise?

It is also interesting how to organize fast work with memory.

  • Use Python and expand, where required, with your own modules - this is for you and GC :) - yapycoder
  • In Python it is extremely difficult to create a sandbox. In addition, I want to learn myself, disassembled in the device work GC. - Vladimir Gordeev

2 answers 2

Start with general information. Read about the GC device in large virtual machines, such as Java and .NET, where GCs are implemented very well and you can even choose different implementations.

Here, for starters, you can read in Russian Garbage Collection clearly

Here on the RSDN about GC in .NET .

To start this information will be enough to start.

Yes, and last: malloc is fast. If it does not work fast, then it means that you are doing something wrong or wrong.

    A series of articles in Russian on garbage collection in Java from IBM:

    And more on the links at the end of articles a lot of interesting.

    PS By itself, With malloc works quickly: this is the main functionality of the language, it is honed to the limit. Perhaps it works more slowly than something, but then you need to clarify what the comparison is with.