Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

StrArray memory fix#454

Merged
mattyclarkson merged 3 commits intonodegit:masternodegit/nodegit:masterfrom
mattyclarkson:str-array-memory-fixmattyclarkson/nodegit:str-array-memory-fixCopy head branch name to clipboard
Mar 3, 2015
Merged

StrArray memory fix#454
mattyclarkson merged 3 commits intonodegit:masternodegit/nodegit:masterfrom
mattyclarkson:str-array-memory-fixmattyclarkson/nodegit:str-array-memory-fixCopy head branch name to clipboard

Conversation

@mattyclarkson
Copy link
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.

@mattyclarkson
Copy link
Collaborator Author

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

@johnhaley81
Copy link
Collaborator

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

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.