Skip to content

mmap set offset = 4096 will fail #2374

Open
@EdagrHW

Description

std::string fileData;
size_t fileSize = sysconf(_SC_PAGESIZE) * 100 + 10;
fileData.reserve(fileSize);
for (size_t i = 0; i < fileSize; i++) {
fileData.push_back(0xff & Random::rand32());
}

File f = File::temporary();
writeStringToFileOrDie(fileData, f.fd());
std::cout << "fileSize" << fileSize << std::endl;
MemoryMapping m(File(f.fd()), 4096, 8193);

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions