On Oct 20, 2011, at 8:19 PM, Wilker wrote:

> I mean I will use the f* operations.
> But they are really safe? There is anything that I can do for extreme
> situations in case to avoid bad memory access?

What’s unsafe is accessing file-mapped memory after the file becomes 
unavailable.

If you use fread (or read), you’re not doing that. You're allocating your own 
memory from the heap first, then copying data from the file into it. There’s 
nothing dangerous about that. The memory will be available until you explicitly 
free it.

—Jens_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to