Skip to main content

Home/ Programming/ Group items tagged memory

Rss Feed Group items tagged

Andrey Karpov

What Every Programmer Should Know About Memory - 0 views

  •  
    As CPU cores become both faster and more numerous, the limiting factor for most programs is now, and will be for some time, memory access. Hardware designers have come up with ever more sophisticated memory handling and acceleration techniques-such as CPU caches-but these cannot work optimally without some help from the programmer. Unfortunately, neither the structure nor the cost of using the memory subsystem of a computer or the caches on CPUs is well understood by most programmers. This paper explains the structure of memory subsys- tems in use on modern commodity hardware, illustrating why CPU caches were developed, how they work, and what programs should do to achieve optimal performance by utilizing them.
Andrey Karpov

The reasons why 64-bit programs require more stack memory - 0 views

  •  
    In forums, people often say that 64-bit versions of programs consume a larger amount of memory and stack. Saying so, they usually argue that the sizes of data have become twice larger. But this statement is unfounded since the size of most types (char, short, int, float) in the C/C++ language remains the same on 64-bit systems. Of course, for instance, the size of a pointer has increased but far not all the data in a program consist of pointers. The reasons why the memory amount consumed by programs has increased are more complex. I decided to investigate this issue in detail.
Andrey Karpov

Low-Fragmentation, High-Performance Memory Allocation in Despair Engine - 0 views

  •  
    I recently wrote about dlmalloc and how it is a poor choice for a memory allocator for console games. As I explained in my previous article, dlmalloc has two major limitations. It manages a pool of address space composed of discrete regions called segments. It can easily add segments to grow its pool of address space, but it can't easily remove segments to return address space to the OS. Additionally, it doesn't distinguish between physical and virtual memory, which means that it can't take advantage of virtual memory's ability to combat fragmentation.
1 - 3 of 3
Showing 20 items per page