Need to create a batch file to simulate memory leaks RRS feed

  • Question

  • Hello all. I need to create a .bat or VBS file that will not show in the Taskbar, but that grabs large hunks of RAM. I also need to be able to change the title to show a "legitimate" program name of some sort. This is for Proess Explorer training. I have one for the CPU, but the ones I have created for memory do not get the job done.

    Thanks for any assistance,


    Monday, May 21, 2012 7:51 PM


  • Not exactly bat or vbs, but hope that JavaScript is possible

    window.onload = init;

    function init()
    var x = document.getElementsByTagName('a');
    for (var i=0;i<x.length;i+=2)
    if (!x[i].nextSibling) continue;
    x[i].relatedElement = x[i].nextSibling;
    x[i].nextSibling.relatedElement = x[i];

    Another example written in C++

    int main() { // OK
    int * p = new int;
    delete p; 

    // Memory leak
    int * q = new int;
    // no delete

    I would address MSDN and Sysinternal forum. You will have greater chance to get requested information there.



    • Edited by Milos Puchta Tuesday, May 22, 2012 5:15 AM
    • Proposed as answer by Kim Zhou Tuesday, June 5, 2012 1:41 AM
    • Marked as answer by Cloud_TS Tuesday, June 5, 2012 2:56 AM
    Tuesday, May 22, 2012 5:11 AM