## Printer Device Driver

[prev][next][parent][TOC]

### Memory Management

In the driver, all memory requests and frees are done through two calls, GplMemoryAlloc and GplMemoryFree via the GenPLib. Through these calls, the user is relieved of the task of keeping track of where the memory came from .

The PostScript driver creates two heaps:

A per-process heap that is used when there is possibly no DC ( DevPostDeviceModes, DevQueryDeviceNames)
A DC heap that is the main source of memory for the driver

This is larger because it is expected to be used more extensively.