Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Memory allocation failure #154

Open
fernandocanizo opened this issue May 17, 2022 · 2 comments
Open

Bug: Memory allocation failure #154

fernandocanizo opened this issue May 17, 2022 · 2 comments
Labels
C-bug Category: Something isn't working

Comments

@fernandocanizo
Copy link

Scenario: trying to get ride of some initial lines from an SQL dump file to be able to properly import it on my local Postgres database. File size is around 80GB.

$ sd 'CREATE PROFILE.*' "" db-dump.sql 
memory allocation of 84931776403 bytes failedAborted (core dumped)

An application that tries to emulate or be an easier sed should work with files of any size, by chunks. Not try to load the whole thing in memory. Otherwise I'd just use my favourite editor.

@fernandocanizo fernandocanizo changed the title Memory allocation failure Bug: Memory allocation failure May 17, 2022
@aiac
Copy link

aiac commented Aug 30, 2022

Same here, 4GB RAM, 10GB file

memory allocation of 8589934592 bytes failed
Aborted (core dumped)

@CosmicHorrorDev CosmicHorrorDev added C-bug Category: Something isn't working M-needs triage Meta: Maintainer label me! labels May 17, 2023
@PeterlitsZo
Copy link

But the behavior of the application depends on the regex library and it looks like they do not want to deal with stream cases (see rust-lang/regex#425) - and that is what we need. Does anyone have a good idea? Maybe we can create ourself regex library that can help us deal with the edge cases but it ought to be much much hard than we think.

See src/replacer/Replacer/replace for more detail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants