Skip to content

StrArray memory fix#454

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

StrArray memory fix#454
mattyclarkson merged 3 commits intonodegit:masterfrom
mattyclarkson:str-array-memory-fix

Conversation

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

@mattyclarkson
Copy link
Copy Markdown
Collaborator Author

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

@johnhaley81
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 👍

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