K
K
Kirill Zhilyaev2018-10-05 17:50:10
C++ / C#
Kirill Zhilyaev, 2018-10-05 17:50:10

How to set a breakpoint when using a lot of RAM?

The program sometimes starts to take a lot of memory from the heap for a short period of time (200 megabytes for 1 second). Can I somehow stop the program on the malloc that allocates, for example, the 200th megabyte of memory

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaly, 2018-10-05
@vt4a2h

Custom allocators and/or condition breaks.

A
Antony, 2018-10-07
@RiseOfDeath

In general, if the program has a need to monitor its memory allocation, then a custom allocator is written and used in the program.
Those. you write your malloc and free with blackjack and other functionality you need - if you don't want to give more than 200MB per second - don't give it, if you don't want to allocate more than 1GB - don't allocate, etc.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question