Default [Q] simulate low RAM on an android device

Hello,
does anyone knows how to simulate low ram on an android device? I want to test my app with low RAM, but the emulator is too slow and i'd like to be able to test it on my HTC one running it only with 512 MB of ram instead of using 2 GB,

(i'm rooted)

Is it possible? Thanks in advance
Phones
Nokia 6630 > Nokia N97 mini > Nokia N900 > HTC Sensation > HTC One

Tablet
Asus Nexus 7