Marea is spare memory management for dynamic languages. Marea source code and information is available at Marea's goal is to automatically detect and swap out to secondary memory unused objects. When one of these swapped out objects is needed, it is automatically brought back into primary memory. To achieve this, while swapping out, the system replaces the original (unused) objects by proxies. Marea updates all objects which were pointing to the existing unused objects to now point to the proxys. Whenever a proxy receives a message, it loads back the swapped out object from secondary memory. Moreover, Marea swaps all objects, whether they are normal objects, classes or methods.

Marea decomposed projects

Marea itself is a large project which can be decomposed in smaller ones:MareaGraph

Unused Objects Detector

It is important to understand which parts of the system are instantiated but also which are used or unused. We define that a used object is one that receives a message or that is directly used by the VirtualMachine, during a specific period of time. The main challenge here is where to store the mark of each object. Adding an instance variable to Object (the root class of the Smalltalk hierarchy chain) and store there a Boolean object is not possible in Pharo, and the requirement of an extra reference for each object is highly memory consuming. Our solution modifies the Pharo VM so that we can use an empty bit of the object header to mark objects as used. That way we do not use extra memory and it works efficiently. We also modify the code of the VM that implements the message send to turn on the bit when an object receives a message.For more details visit Unused Objects Detector.

Used Object Maps

Distribution Maps is part of the Moose suite, a platform for software and data analysis. Moose is also implemented on top of Pharo Smalltalk and, therefore, we use our modified Virtual Machine (the VM from the previous tool "Unused objects detector") to run it.The Distribution Maps technique provides a quick look at the distribution of properties within a system and it reveals complex information in an intuitive way. The use of Distribution Map fills the gap between the raw results obtained by automated algorithms and the following analysis carried out by a human expert.The idea of software visualization is helping us to analyze software, to understand the results of an analysis, to answer questions, etc. In our context, it is important to know which classes, methods and packages are used for the minimal code execution. This is important for building minimal systems and for knowing which are the classes that should be part of that base system. Which classes does the system use more? Which classes have several instances and most of them are used? Which classes or packages are not used at all? Which classes have instances but are not generally used?With UsedO Object Maps we answer all those questions through meaningful visualizations.For more details visit Used Object Maps.

Fuel Serializer

Marea needs to move objects between primary and secondary memory. Hence, it needs to serialize objects. In addition, Marea supports swapping almost all kind of objects. Therefore Marea needs a serializer capable of serializing all type of objects. Speed and performance is also important and this is why Marea uses Fuel serializer. For more details check Fuel website.

Ghost Proxies

Unused objects are replaced by proxies, which have the responsability to intercept all messages send to them. When proxies intercept a message they need to search the unused swapped out objects in seconday memory, load them back in primary memory, and finally replace the proxy with the original object. For this purposes Marea uses Ghost, an uniform, light-weight and stratified Proxy model and implementation. Ghost proxies let us intercept all messages sent to a proxy, with clear separation between the layers of intercepting and handling interceptions. For more details visit Ghost Proxies.


Marea is two things at the same time: 1) it is the name of the whole project which includes all the mentioned smaller projects; 2) it is one small project at the same time and it is what we call MareaCore. MareaCore's main goal is to glue all the rest of the projects and perform its task: automatic detection of unused objects and swap them in and out from primary and secondary memory. For more details visit MareaCore.Marea uses:


PhD student

Mariano Martinez Peck - marianopeck (at) gmail (dot) com

PhD supervisors


Marea task is to constantly move things from one place to another one, that is, to move objects between primary and secondary memory. Marea is developed op top of Pharo Smalltalk, and hence its name "Marea" means tide in Spanish (because I am Argentinian).


The logo was designed by Claire Barroca under license CC BY-SA. It has a nice explanation: