Re: mmap resizing macosx unix

2009-04-05 Thread David Pratt
For sake of documenting for list, I ended up opening file a second time with 'a', padding it to extend its size (previous size + additional bytes to accommodate the insertion), closing file, open file with 'r+', open a second mmap with with new size, moving text to new location, then inser

Re: mmap resizing macosx unix

2009-04-05 Thread David Pratt
Hi Phillip. I appreciate your reply. I think perhaps I will need to create a new mmap as a work around and write to locations of the second mmap based on my regex searches in the first. I should have said I am using 2.5.4 as well to be clear. I am wondering if I should recommend change to d

Re: mmap resizing macosx unix

2009-04-05 Thread Philip Semanchuk
On Apr 5, 2009, at 10:28 AM, David Pratt wrote: Hi. I have been experimenting with mmap recently. I determined how to read and write properly from it and so search and replace on large files. The problem I am having is with replaces that are larger than the mmap. In this instance I need to

mmap resizing macosx unix

2009-04-05 Thread David Pratt
Hi. I have been experimenting with mmap recently. I determined how to read and write properly from it and so search and replace on large files. The problem I am having is with replaces that are larger than the mmap. In this instance I need to * rewind * resize the mmap to accomodate the tex