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

allocate slice with known capacity in *ListImpl() functions (#102) #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cathy-zhou
Copy link
Owner

The current implementation of *ListImpl() functions allocate more memory
than that is required. We can just allocate the slice with exact
capacity as we know the number of the logical resources.

Signed-off-by: Yun Zhou [email protected]

@cathy-zhou cathy-zhou force-pushed the p102 branch 2 times, most recently from 15e9e43 to 1101cfc Compare August 17, 2020 18:50
The current implementation of *ListImpl() functions allocate more memory
than that is required. We can just allocate the slice with exact
capacity as we know the number of the logical resources.

Fixes issue (eBay#102)

Signed-off-by: Yun Zhou <[email protected]>
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.

1 participant