Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Jul 2000 23:09:46 +0800
From:      Trent Nelson <tpnelson@echidna.stu.cowan.edu.au>
To:        Dimitar Peikov <mitko@rila.bg>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: mmap syncs and file extends
Message-ID:  <398050BA.E7C7F4A0@echidna.stu.cowan.edu.au>
References:  <00072715314205.05330@earth>

next in thread | previous in thread | raw e-mail | index | archive | help


Dimitar Peikov wrote:
> 
> Hi, hackers,
> 
> I've try to use mmap() and resize the mapping. msync() syncronizes
> only the memory that was mmapped with mmap(). How can I extend the
> main file? Memory is filled correctly, but I must write extended data
> to file by hand.

	You need to extend the main file by calling ftruncate() as you can't
map memory past the file's current EOF.

	I got an excellent response from Matt Dillon on a question of a similar
nature a few months ago. It might be in your interest to check the
hackers mail archive a little deeper.

> Dimitar Peikov

	Regards,

		Trent.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?398050BA.E7C7F4A0>