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

C - free()

Name: Anonymous 2012-12-31 14:02

If I allocate a block of memory, malloc() returns a pointer saved in variable x. I can set it free with free(x).
Now what if I don't know the pointer x anymore, but a pointer to an element within the allocated memory block - like &x[10] for example. Does free(&x[10]) do the same thing as free(x)? Or is possible to let it work that way?

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