Search found 5 matches

by aquibjamal123
Tue Mar 09, 2021 1:46 am
Forum: General Discussion
Topic: Heap corruption with aligned memory allocator in tiny_cnn
Replies: 6
Views: 5286

Re: Heap corruption with aligned memory allocator in tiny_cnn

I have written a simpler function as shown below. The header containing the aligned allocator class is also attached with this post. As already mentioned, vec_t is typedef of typedef std::vector<float_t, aligned_allocator<float_t, 64>> vec_t; void myfunction() { vec_t myvector1(1,0); vec_t myvector2...
by aquibjamal123
Mon Mar 08, 2021 3:14 pm
Forum: General Discussion
Topic: Heap corruption with aligned memory allocator in tiny_cnn
Replies: 6
Views: 5286

Re: Heap corruption with aligned memory allocator in tiny_cnn

I suspect the memory leak is from the variable img which is of type vec_t . This is a typedef - typedef std::vector<float_t, aligned_allocator<float_t, 64>> vec_t; . I think, this variable is not deleted, when the function ends and it is causing the memory leak. I initialised the size of img to be C...
by aquibjamal123
Tue Mar 02, 2021 10:41 pm
Forum: General Discussion
Topic: Heap corruption with aligned memory allocator in tiny_cnn
Replies: 6
Views: 5286

Re: Heap corruption with aligned memory allocator in tiny_cnn

I changed the ESP-IDF version and pulled the libraries from master branch. The output of idf.py --version is : ESP-IDF v4.4-dev-4-g73db14240 I am also using heap_caps_free() instead of deprecated function heap_caps_aligned_free() . I am still getting the heap corruption error and board reboots conti...
by aquibjamal123
Tue Mar 02, 2021 10:56 am
Forum: General Discussion
Topic: Heap corruption with aligned memory allocator in tiny_cnn
Replies: 6
Views: 5286

Re: Heap corruption with aligned memory allocator in tiny_cnn

Hi,

The output of idf.py --version is : ESP-IDF v4.2-dirty
Should I use different version to call heap_caps_aligned_alloc()?

With regards,
Aquib
by aquibjamal123
Tue Mar 02, 2021 2:56 am
Forum: General Discussion
Topic: Heap corruption with aligned memory allocator in tiny_cnn
Replies: 6
Views: 5286

Heap corruption with aligned memory allocator in tiny_cnn

I have a tiny_cnn function parse_cifar10() for which I am tracing heap corruption. I am including the file present at - [https://github.com/Xilinx/xilinx-tiny-cnn/blob/master/tiny_cnn/io/cifar10_parser.h] ESP_ERROR_CHECK( heap_trace_start(HEAP_TRACE_LEAKS) ); parse_cifar10(path, &test_images, &test_...