Skip to content

Remove redundant if block#460

Closed
PawelGribov wants to merge 1 commit intoGPUOpen-LibrariesAndSDKs:masterfrom
PawelGribov:remove_redundant_if
Closed

Remove redundant if block#460
PawelGribov wants to merge 1 commit intoGPUOpen-LibrariesAndSDKs:masterfrom
PawelGribov:remove_redundant_if

Conversation

@PawelGribov
Copy link
Copy Markdown
Contributor

Leave only else part. If I understand this TLSF logic correctly, two adjacent free blocks are merged immediately when one of them is freed. So the previous physical block will never be free.

adam-sawicki-a added a commit that referenced this pull request Jan 29, 2025
@adam-sawicki-a
Copy link
Copy Markdown
Contributor

Does this change fix any bug, or just removes the code that we suspect to never execute?

By the way, I fixed the triple "s" typo that you noticed.

currentBlock and prevPhysical block can't be free at the same time at this moment.
@PawelGribov
Copy link
Copy Markdown
Contributor Author

It just removes the code that i suspect to never execute (but not really sure can it be hidden logic)

@adam-sawicki-a
Copy link
Copy Markdown
Contributor

I am not sure either 🙂 and I don't have time right now to analyze it, as this is not a bug to be fixed, so I propose to leave it as-is.

@PawelGribov
Copy link
Copy Markdown
Contributor Author

ok, closed 🙂

@adam-sawicki-a adam-sawicki-a added wontfix This will not be worked on quality Code quality improvement e.g. refactoring labels Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

quality Code quality improvement e.g. refactoring wontfix This will not be worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants