Skip to content

Commit

Permalink
Merge pull request #509 from IntersectMBO/recursion-ninja/FilePointer…
Browse files Browse the repository at this point in the history
…-conversion

Resolving TODO: Converted FilePointer to Word representation
  • Loading branch information
jorisdral authored Jan 14, 2025
2 parents 3337664 + f0e00a8 commit 4cfbf9b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Database/LSMTree/Internal/WriteBufferBlobs.hs
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,10 @@ mkWeakBlobRef (DeRef WriteBufferBlobs {blobFile}) blobspan =


-- | A mutable file offset, suitable to share between threads.
--
-- This pointer is limited to 31-bit file offsets on 32-bit systems. This should
-- be a sufficiently large limit that we never reach it in practice.
newtype FilePointer m = FilePointer (PrimVar (PrimState m) Int)
--TODO: this would be better as Word64
-- this will limit to 31bit file sizes on 32bit arches

instance NFData (FilePointer m) where
rnf (FilePointer var) = var `seq` ()
Expand Down

0 comments on commit 4cfbf9b

Please sign in to comment.