Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Problem with a simple C app. Calloc

Name: shaun 2010-06-04 8:43

I'm making this simple C program.  I'm using Calloc to allocate space to hold an array containing the number of instances of each letter in the file.
Source: http://pastebin.com/G46Pr6Tg

When I try to Calloc, or Malloc then memset the memory, one of the items in the array is not initialised to zero.  This is part of the array straight after initialisation:
......
Number of f: 0
Number of g: 0
Number of h: 134777
Number of i: 0
Number of j: 0
......

What did I do wrong?

Name: Anonymous 2010-06-04 14:31

>>16
Will do, but it would still be nice to have some good documentation on x86 memory internals in practice.

I kind of looked at that kind of things, but i have the feeling i know less about x86 now then i did before.
Also most of the stuff on the net is quite theoretical, would be cool i had something that could give me an overview of the x86 internals and some ASM examples of that kind.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List