Skip to content

Conversation

@zhuizhuhaomeng
Copy link
Contributor

No description provided.

@simpl simpl closed this May 21, 2022
@zhuizhuhaomeng
Copy link
Contributor Author

we need to alloc space for buckets elements whose size is sizeof(ngx_str_t *).
so we should use bucket = ngx_palloc (cf->pool, buckets * sizeof (ngx_str_t *))

if you use sizeof (ngx_str_t **) which means the element type is ngx_str_t **, and the container type shoube ngx_str_t ***.

@simpl simpl reopened this May 21, 2022
@simpl
Copy link
Member

simpl commented May 21, 2022

Yes, I see. Well spotted. Thanks.

@simpl simpl merged commit b4642d6 into vision5:master May 21, 2022
@simpl simpl changed the title change: fixed a typo. Fixed a typo May 21, 2022
@zhuizhuhaomeng
Copy link
Contributor Author

@simpl Would you please create a new tag?

@zhuizhuhaomeng zhuizhuhaomeng deleted the size_of_malloc branch October 18, 2022 04:05
@simpl
Copy link
Member

simpl commented Oct 18, 2022

@zhuizhuhaomeng Done - v0.3.2.

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