Skip to main content

Questions tagged [memory-leak]

15 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0 votes
0 answers
12 views

where is the memory leak in my code?

cant find where is the memory leak here is my code // Implements a dictionary's functionality #include <stdio.h> #include <ctype.h> #include <stdbool.h> #include <string.h> #...
Omar Rehan 777's user avatar
0 votes
0 answers
130 views

Pset5 Speller Memory Problem

I am having a memory issue with my program in speller. Check50 returns all green except for the last line which says :( program is free of memory errors expected "MISSPELLED WOR...", not &...
sage7major16's user avatar
0 votes
1 answer
235 views

Valgrind says 8,013,096 bytes in 143,091 blocks are still reachable in loss record 1 of

Hi) I understand that something incorrect with unload function and that 143,091 blocks it's basically the number of words in the dictionary that was uploaded by the program and I didn't manage to ...
NikitaKvitka's user avatar
0 votes
1 answer
79 views

Speller pset 5: Valgrind gives me error

I am doing pset 5 speller and It seems to be okey less valgrind check. Valgrind HELP50 gives me these errors ==22585== Use of uninitialised value of size 8 ==22585== at 0x40110B: hash (dictionary.c:...
santiago correa's user avatar
0 votes
0 answers
109 views

Recover Assignment Memory Leak and Insufficient Recovery

I am trying to complete the assignment given by CS50x (Harvard Community Online, edX.org), and while it successfully recovers images, valgrind is telling me that there are memory leaks that happen in ...
DigitalPancake's user avatar
0 votes
1 answer
32 views

Pset5 - Where am I leaking 1 block of memory?

// Implements a dictionary's functionality #include <stdio.h> #include <stdbool.h> #include <stdlib.h> #include "dictionary.h" #include <string.h> #include <...
Shriever's user avatar
0 votes
1 answer
259 views

PSET 5 Speller Failing free memory of errors final check

So i am so close to finally completing this present and i still have some final errors to go through. Valgrind is saying that it is still leaking memory for some reason and i cant find the reason why. ...
MereDONGP's user avatar
0 votes
1 answer
100 views

PSET5 speller memory leak and dictionary not unloaded

I have been looking at this for about 5 days now and I can´t find where I am leaking memory or if I have any problems with my code logic. Everything compiles and Valgrind output is below. I am ...
snowboly's user avatar
0 votes
0 answers
96 views

PSET5 Valgrind Problem!

I have my code semi working (it passes most of the check50) except Valgrind keeps reporting 'Invalid read of size 1' . Here is a screenshot of the error message: . I used the djb2 hash function. ...
janecrager's user avatar
0 votes
1 answer
491 views

valgrind memory leak on speller linked list..."blocks are definitely lost..."

I'm working on my memory leaks for the load() function. Valgrind give me the following error message ==1675== HEAP SUMMARY: ==1675== in use at exit: 8,011,640 bytes in 143,065 blocks ==1675== ...
Katie Melosto's user avatar
0 votes
0 answers
1k views

"Still reachable" in Valgrind

I have noticed on a few programs that, while none of them have any memory leaks, flag a "still reachable" message when run via valgrind. Does "still reachable" simply mean that there are pointers in ...
Gabriel Saul's user avatar
0 votes
1 answer
85 views

Speller - Memory allocation

I'm finishing up speller with a hashtable, but Valgrind is giving me two different headaches. One of them has to do with this famous 32 bytes, which apparently is some kind of clang bug so I'll ignore ...
AGF's user avatar
  • 1
0 votes
1 answer
217 views

Pset5 Memory leak and errors in valgrind

I have been beating my head against a wall trying to solve my issues on my own, but I have gotten no where. I have two issues: 1) I have a small memory leak of 568 bytes in 1 block. My unload function ...
Ben's user avatar
  • 3
0 votes
1 answer
85 views

PSET5. Free a variable outside a loop. leaking memory

I've been stuck for days in the implementation of LOAD with a TRIE data structure. I think my code works (well it doesn't show seg faults) but I am getting a lot of memory leaks. I implemented the ...
Diego Miquilena's user avatar
0 votes
2 answers
66 views

2D array of given size

I want to create a 2D array of ints, where the array's dimension is given at run time (not compile time). So far, I have been using: int **ptr = malloc(m * sizeof(int*)); for (size_t i = 0; i < m;...
dpalma's user avatar
  • 123