Your best option would be to use a recent 2.4 kernel (2.4.2 at the time I write this), where the shared memory limits are dynamically configurable at runtime.