NMEM: Update API to use size_t for sizes