Skip to content

Heapy reports 0 allocations #6

@iamsergio

Description

@iamsergio
#include <iostream>
#include <string>
struct Foo {
    char v [1024 * 1024 * 300]; // 300 Mb

    Foo() {
        std::cout << "Constructed\n";
    }

    ~Foo() {
        std::cout << "Deleted\n";
    }

};

int main()
{
    new Foo();
    malloc(1024 * 1024 * 300);
    std::string *s = new std::string("test");
    std::cout << *s << "\n";
    return 0;
}

Results in:

Printing top allocation points.
Top 0 allocations: 0Mb
Total allocations: 0Mb (difference between total and top 0 allocations : 0Mb)

Test compiled with:

cl.exe main.cpp

Ran with:

Heapy_x64.exe main.exe

Tested Visual Studio 2013 and 2019

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions