size_t usage in OpenCL

size_t is used all over the place in the standard. However, size_t is defined by the os/compiler, but the device could actually support more than 4GB of memory. For example, fermi will have 6GB of memory, but theoretically that could be running on a 32-bit linux machine (which unfortunately still do exist).

Or am I missing something fundamental about size_t?

hello,
Please check CL_DEVICE_ADDRESS_BITS.