Respected sir: Thank for your reply.As i am working on generational garbage collector for c language.I want to partition the heap into three generation and than i want the malloc function such that it allocate the data object with in the range in which i want.For that i have to write my malloc fuction.So i want the real behaviour of malloc function.Kindly help me out to make partition with in the heap than modify the malloc function for the specific range. Thank You Amit Prakash