move setting of segment usage into kernel