Add function which returns local memory usage of a sort kernel