  For the last thirty years, a large variety of memory allocators have been
proposed. Since performance, memory usage and energy consumption of each memory
allocator differs, software engineers often face difficult choices in selecting
the most suitable approach for their applications. To this end, custom
allocators are developed from scratch, which is a difficult and error-prone
process. This issue has special impact in the field of portable consumer
embedded systems, that must execute a limited amount of multimedia
applications, demanding high performance and extensive memory usage at a low
energy consumption. This paper presents a flexible and efficient simulator to
study Dynamic Memory Managers (DMMs), a composition of one or more memory
allocators. This novel approach allows programmers to simulate custom and
general DMMs, which can be composed without incurring any additional runtime
overhead or additional programming cost. We show that this infrastructure
simplifies DMM construction, mainly because the target application does not
need to be compiled every time a new DMM must be evaluated and because we
propose a structured method to search and build DMMs in an object-oriented
fashion. Within a search procedure, the system designer can choose the "best"
allocator by simulation for a particular target application and embedded
system. In our evaluation, we show that our scheme delivers better performance,
less memory usage and less energy consumption than single memory allocators.
