A method of allocating memory in a data processing system 10 and a memory
allocation mechanism 54 are provided. Memory is allocated by the memory
allocation mechanism in response to a memory allocation request 56 from a
process 50 running on the system 10. The request 56 includes data
identifying the size of the block required and an indication of a mask
bit pattern. The memory allocation mechanism receives the request,
selects a block of memory having an appropriate size and having an
address with a bit pattern which corresponds correctly to the indicated
mask bit pattern, and allocates the selected block of memory to the
process.