FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

StrArray memory fix by mattyclarkson · Pull Request #454 · nodegit/nodegit · GitHub

Repository navigation

StrArray memory fix - #454

Merged
mattyclarkson merged 3 commits into
nodegit:masterfrom
mattyclarkson:str-array-memory-fix
Mar 3, 2015
Merged

mattyclarkson merged 3 commits into
nodegit:masterfrom
mattyclarkson:str-array-memory-fix

Conversation

Copy link
Copy Markdown
Collaborator

We were only allocating enough memory for a git_strarray memory pointer rather than the structure. 1a74a2d fixes that.

7c81612 changes the code to allocate the memory for the structure and the string pointers all in one go to reduce fragmentation. Complete micro-optimisation, happy for it to not get merged but thought I'd do it anyway.

Copy link
Copy Markdown
Collaborator Author

@johnhaley81, could you just put your eyes over this before I merge?

Copy link
Copy Markdown
Collaborator

This is a much better way to allocate memory for the structure. I added a minor comment but after that 👍

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL