Skip to content

Take file size using fstat in map_in_file() in umap_file.hpp #18

@KIwabuchi

Description

@KIwabuchi

In map_in_file(), I think, we can take the file size using fstat instead of using the 'numbytes' argument when either initonly or !noinit is true.
Consequently, the code below won't be necessary.
if ( (off_t)sbuf.st_size != (numbytes) ) { std::cerr << filename << " size " << sbuf.st_size << " does not match specified data size of " << (numbytes) << std::endl; return NULL; }

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions