Skip to content

Commit

Permalink
Merge pull request #1 from gregestren/patch-1
Browse files Browse the repository at this point in the history
Grammar fix
  • Loading branch information
gregestren committed Mar 31, 2016
2 parents b1a7c23 + 6f777f9 commit b74771a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions en/1-Beginner/Personal-Skills/09-How to Manage Memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ The creation of new objects is moderately expensive on any system. Memory alloca

An important case occurs when you can define an upper bound on the number of objects you will need at one time. If these objects all take up the same amount of memory, you may be able to allocate a single block of memory, or a buffer, to hold them all. The objects you need can be allocated and released inside this buffer in a set rotation pattern, so it is sometimes called a ring buffer. This is usually faster than heap allocation.

Sometimes you have to explicitly free allocated space so it can be reallocated rather than rely on garbage collection. Then you must apply careful intelligence to each chunk of allocated memory and design a way for it to be deallocated at the appropriate time. The method may differ for each kind of object you create. You must make sure that every execution of a memory allocating operation is matched by a memory deallocating operation eventually. This is so difficult that programmers often simply implement a rudimentary form or garbage collection, such as reference counting, to do this for them.
Sometimes you have to explicitly free allocated space so it can be reallocated rather than rely on garbage collection. Then you must apply careful intelligence to each chunk of allocated memory and design a way for it to be deallocated at the appropriate time. The method may differ for each kind of object you create. You must make sure that every execution of a memory allocating operation is matched by a memory deallocating operation eventually. This is so difficult that programmers often simply implement a rudimentary form of garbage collection, such as reference counting, to do this for them.

Next [How to Deal with Intermittent Bugs](10-How to Deal with Intermittent Bugs.md)
Next [How to Deal with Intermittent Bugs](10-How to Deal with Intermittent Bugs.md)

0 comments on commit b74771a

Please sign in to comment.