Instead of setting the shared and total memory usage thresholds, you can set a single threshold that measures the amount of unshared memory by subtracting the shared memory size from the total memory size.
Both modules allow you to set the thresholds in similar ways. With Apache::GTopLimit, you can set the unshared memory threshold server-wide with:
$Apache::GTopLimit::MAX_PROCESS_UNSHARED_SIZE = 6144;
and locally for a handler with:
If you are using Apache::SizeLimit, the corresponding settings would be:
$Apache::SizeLimit::MAX_UNSHARED_SIZE = 6144;