Skip to contents

Returns a list containing the fields of a memory mapped vector

Usage

mmap_details(x)

Arguments

x

A vector which has an mmap ALTREP class

Value

A list with the fields:

  • file_name: A character scalar. The file name of that file that was mapped

  • size_bytes: An integer scalar. The number of bytes of the memory map

  • length: An integer scalar. The number of entries in the memory mapped vector

  • type: "double", or "integer", indicating the data type of the memory map

  • ptrOK: logical scalar. Unknown meaning

  • wrtOK: logical scalar. TRUE if writing to the memory map is allowed

  • serOK: logical scalar. Unknown meaning

Examples

mmap_make(data = 1:10) |> mmap_details()
#> $file_name
#> [1] "/tmp/RtmpP8knXX/file1430c7b714c6"
#> 
#> $size_bytes
#> [1] 40
#> 
#> $length
#> [1] 10
#> 
#> $type
#> [1] "integer"
#> 
#> $ptrOK
#> [1] TRUE
#> 
#> $wrtOK
#> [1] FALSE
#> 
#> $serOK
#> [1] FALSE
#>