Questions tagged [pset5]

The problem set for Week 5 will challenge you to apply what you've learned about pointers, memory management, file i/o and structs, creating more complex data structures (such as Hash Tables or Tries) and leveraging their power to write a lightning-fast spell check algorithm.

Filter by
Sorted by
Tagged with
0
votes
2answers
803 views

recover.c only recovers 1 image

I'm having a problem with my code for recover.c because it recovers only 1 JPEG and that JPEG isn't a JPEG. It starts with 0x68 and 0x74. After going through the code with GDB, it seems as that on ...
0
votes
1answer
872 views

pset5, have a seg fault but valgrind reports no error

I think I have load, check and size function running successfully. However, my code meets seg fault again. Valgrind reports: ==5654== Stack overflow in thread 1: can't grow stack to 0xffe801ff8 ==...
0
votes
1answer
219 views

PSET5: memory leak

Mem. leaking. help. Only written load function but have the free function within load. Haven't fleshed out unload yet. Want to test that load works before fleshing out unload hence have included the ...
0
votes
1answer
741 views

Pset5 trie problem with load: persisting segmentation fault

I read lot of questions and answers about the "load"segmentation errors in pset5 but I still experience some difficulties fixing it. I tried to make sure there are no garbage values by initializing ...
0
votes
1answer
285 views

Segfault when implementing trie in pset5

I'm trying to implement a trie as my load function in pset5, but I have two questions: How did I fix the segfault I encounter? (identified specifically below) More broadly, where are the errors in my ...
0
votes
2answers
302 views

Submitting pset5 for proper grading

On the advice of the following statement in the instructions for pset5: "You may add functions to dictionary.c or to files of your own creation so long as all of your code compiles via make." I ...
0
votes
1answer
291 views

pset5 resize segmentation fault?

I am getting a segmentation fault when I run this program, and am fairly sure that the problem is in the third for loop, where I try to copy the bytes from *pixel to *line, duplicating each byte '...

1
2