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

runtime:fix wrong comment #44786

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

Conversation

cs-chicken
Copy link

original comment may be wrong
the dataSize is the size of new object (except allocating a defer block
and the arguments size is the actually rounded to the next malloc size class

@google-cla google-cla bot added the cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change. label Mar 4, 2021
@gopherbot
Copy link

This PR (HEAD: d9b37ba) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/298689 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

Comment on lines +824 to +828
// argument 'size' is always size rounded up to the next malloc size class,
// argument dataSize is always equal typ.size or typ.size * N (when typ is
// array and N is the size of array) except in the case of
// allocating a defer block, in which case
// dataSize is sizeof(_defer{}) (at least 6 words) and 'size' may be
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// argument 'size' is always size rounded up to the next malloc size class,
// argument dataSize is always equal typ.size or typ.size * N (when typ is
// array and N is the size of array) except in the case of
// allocating a defer block, in which case
// dataSize is sizeof(_defer{}) (at least 6 words) and 'size' may be
// The argument 'size' is always the size rounded up to the next malloc size class.
// The argument 'dataSize' is always equal to typ.size or typ.size * N
// (when typ is an array and N is the size of the array),
// except in the case of allocating a defer block.
// In this case, 'dataSize' is sizeof(_defer{}) (at least 6 words), and 'size' may be...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants