[ Previous | Next | Contents | Glossary | Home | Search ]
GL3.2 for AIX: Graphics Library (GL) Technical Reference

chunksize Subroutine


Specifies the amount of memory to be allocated for a display list.


Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void chunksize(Int32 chunk)


INTEGER*4 chunk


The chunksize subroutine gives the system a hint about the appropriate amount of memory to be allocated when compiling a display list. The system may, on occasion, override the hint.

As you add primitives to a display list, the chunk parameter is the unit size (in bytes) by which the memory allocated to the display list grows. The default chunk size is 1024 bytes. A chunk size that is much smaller than the final size of the display list leads to inefficiencies due to fragmentation. A chunk size that is larger than the final display list contains unused, and therefore wasted, memory.

Most subroutines add from 4 to 28 bytes to the display list; subroutines that accept arrays as parameters (for example, the poly subroutine and polf subroutine) typically add to the display list in proportion to the length of the array. Some experimentation may be necessary to determine the optimal chunk size for an application.

Note: This editing subroutine itself cannot be added to a display list.


chunk Specifies the minimum memory size to allocate for an object.

Implementation Specifics

This subroutine is part of GL in the AIXwindows Environment/6000 Version 1, Release 2 with AIXwindows/3D Feature.


/usr/include/gl/gl.h Contains C language constant and variable type definitions for GL.
/usr/include/gl/fgl.h Contains FORTRAN constant and variable type definitions for GL.

Related Information

Unfragmenting and compacting the memory storage of an object with the compactify subroutine.

Initializing the system with the ginit subroutine.

Creating an object with the makeobj subroutine.

AIX Graphics Library Overview and Creating Objects (Display Lists).

[ Previous | Next | Contents | Glossary | Home | Search ]