Commits

Anonymous committed 351053a

updated comment

Comments (0)

Files changed (1)

strategies/mmap.scm

 
 
 ;; map the bytes starting at offset and ending at offset+bytes
-;; into memory, by mapping %current-chunk-size bytes at a time
+;; into memory, by mapping +current-chunk-size+ bytes at a time
 (define (chunk-for-each proc src offset bytes)
   (let ((page-size sys:page-size)
         (mmap-offset offset)
         (target-offset (+ offset bytes))
         (write-timeout (write-timeout)))
     ;(printf "~%1 mmap-offset: ~A ptr-offset: ~A offset: ~A target-offset: ~A ~%" mmap-offset ptr-offset offset target-offset)
-    
+
     ;; ensure page-alignment
     (when (positive? offset)
       (cond
        (else
         (set! ptr-offset offset)
         (set! mmap-offset 0))))
-    
+
     ;(printf "2 mmap-offset: ~A ptr-offset: ~A offset: ~A target-offset: ~A ~%" mmap-offset ptr-offset offset target-offset)
 
     (let loop ((offset offset) (bytes-written 0) (mmap-offset mmap-offset) (ptr-offset ptr-offset))
             (complain #f "write failed"))
            (else
             (loop (- bytes-left result) (pointer-inc work-ptr result))))))))
-