Skip to content

Is Freezer a real memory mapped struct? #29793

@Shawn-Huang-Tron

Description

@Shawn-Huang-Tron

I see the description above Freezer:
https://github.com/ethereum/go-ethereum/blob/v1.13.14/core/rawdb/freezer.go#L57

// Freezer is a memory mapped append-only database to store immutable ordered
// data into flat files:
//
//   - The append-only nature ensures that disk writes are minimized.
//   - The memory mapping ensures we can max out system memory for caching without
//     reserving it for go-ethereum. This would also reduce the memory requirements
//     of Geth, and thus also GC overhead.

I checked all of the code about Freezer, but I can't find the memory-mapping-related function.
Instead, I find that it seems like just write into os.File ? https://github.com/ethereum/go-ethereum/blob/v1.13.14/core/rawdb/freezer_batch.go#L187

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions