fixed upper bounds for style 0 in mem_alloc