Introducing 'mesh,' memory-saving plug-in to boost phone and computer performance

September 19, 2019

AMHERST, Mass. - Applications like web browsers or smartphone apps often use a lot of memory. To address this, a research group co-led by Emery Berger, a professor of computer science at the University of Massachusetts Amherst, has developed a system they call Mesh that can automatically reduce such memory demands. Berger is presenting this work today at Cppcon, the C++ conference in Aurora, Colorado.

Berger and colleagues in the College of Information and Computer Science (CICS) expect Mesh to have a substantial impact on the computing world, from mobile applications to desktops to data centers, because no one has previously been able to compact memory in applications written in or running on top of widely-used languages like C, C++, or Objective C, the language used for iOS apps. 

As the authors explain, programs written in C-like languages can suffer from serious memory fragmentation, where memory is broken up, much like a bad Tetris board, Berger says, so there are many empty gaps in between. "This is how memory gets wasted," he points out. "Imagine a Tetris board where you could stop and reorganize it at any time - this would make the game a lot easier, because you could always squeeze out the empty space. But you can't do this in C, just as you can't do it in Tetris." 

Mesh effectively squeezes out these gaps by taking advantage of a hardware feature called "virtual memory" that is supported by almost all modern computers. "The trick is to find chunks of memory that can be interleaved, sort of like when interlocking gears mesh," Berger explains. When Mesh finds these chunks, it can reclaim the memory from one of the chunks by combining the two chunks into just one. "This meshing process works because we only change things in 'physical' memory. From the perspective of the program, which can only see 'virtual' memory, nothing has changed. This is powerful because we can do this for any application automatically."

The team reports that the results to date have been extremely promising; for example, using Mesh automatically reduces the memory demands of the Firefox web browser by 16%. For Redis, a popular open source data structure server, Mesh reduces memory demands by almost 40%.

The CICS Mesh team includes professor Emery Berger, an expert in memory management who designed the algorithm that the Mac OS X memory manager is based on, professor Andrew McGregor, a specialist in algorithm design and analysis, and doctoral candidates Bobby Powers and David Tench. Powers is a fourth-year doctoral candidate who also is an infrastructure engineer at Stripe, and Tench is a fifth-year doctoral candidate specializing in randomized algorithms.

In a field where "catastrophic fragmentation" was long accepted as inevitable, their software is a major step forward, the authors point out. "This is something that everyone thought to be impossible," notes McGregor. "After Emery had his key insight, we were able to analyze it theoretically and design an efficient algorithm to implement the idea. Against almost 50 years of conventional wisdom, it's great that we now have a solution to this important problem that not only works in theory, but is practical."

Earlier this year, Berger presented technical details at the ACM SIGPLAN Programming Language Design and Implementation conference (PLDI '19) in Phoenix. In response to the paper, Microsoft programmer and distinguished engineer Miguel de Icaza tweeted that Mesh is a "truly inspiring work, with deep impact. A beautiful idea fully developed. What an amazing contribution to the industry."

University of Massachusetts at Amherst

Related Memory Articles from Brightsurf:

Memory of the Venus flytrap
In a study to be published in Nature Plants, a graduate student Mr.

Memory protein
When UC Santa Barbara materials scientist Omar Saleh and graduate student Ian Morgan sought to understand the mechanical behaviors of disordered proteins in the lab, they expected that after being stretched, one particular model protein would snap back instantaneously, like a rubber band.

Previously claimed memory boosting font 'Sans Forgetica' does not actually boost memory
It was previously claimed that the font Sans Forgetica could enhance people's memory for information, however researchers from the University of Warwick and the University of Waikato, New Zealand, have found after carrying out numerous experiments that the font does not enhance memory.

Memory boost with just one look
HRL Laboratories, LLC, researchers have published results showing that targeted transcranial electrical stimulation during slow-wave sleep can improve metamemories of specific episodes by 20% after only one viewing of the episode, compared to controls.

VR is not suited to visual memory?!
Toyohashi university of technology researcher and a research team at Tokyo Denki University have found that virtual reality (VR) may interfere with visual memory.

The genetic signature of memory
Despite their importance in memory, the human cortex and subcortex display a distinct collection of 'gene signatures.' The work recently published in eNeuro increases our understanding of how the brain creates memories and identifies potential genes for further investigation.

How long does memory last? For shape memory alloys, the longer the better
Scientists captured live action details of the phase transitions of shape memory alloys, giving them a better idea how to improve their properties for applications.

A NEAT discovery about memory
UAB researchers say over expression of NEAT1, an noncoding RNA, appears to diminish the ability of older brains to form memories.

Molecular memory can be used to increase the memory capacity of hard disks
Researchers at the University of Jyväskylä have taken part in an international British-Finnish-Chinese collaboration where the first molecule capable of remembering the direction of a magnetic above liquid nitrogen temperatures has been prepared and characterized.

Memory transferred between snails
Memories can be transferred between organisms by extracting ribonucleic acid (RNA) from a trained animal and injecting it into an untrained animal, as demonstrated in a study of sea snails published in eNeuro.

Read More: Memory News and Memory Current Events is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to