I'm writing this program where I have to dynamically allocate memory. So I created a function that mallocs space and does a few other things. When I try to manipulate later outside the function, I get a segfault. How do I make sure that space that I malloc inside of a function is usable outside of that function?

You need to post code.

>>is usable outside of that function
Not necessarily. Depends on the code and how you pass the pointer between the functions. There are several ways to do it so we'd need to see you you tried to do it.