-
Notifications
You must be signed in to change notification settings - Fork 284
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
Avoid large stack allocations on thread stacks. #65
Conversation
@mannol can you review this? You haven't accepted your invitation to the team yet, so I can't assign you the PR. |
69e9307
to
5ff5c1c
Compare
memset(video_y, 0, sizeof(video_y)); | ||
memset(video_u, 0, sizeof(video_u)); | ||
memset(video_v, 0, sizeof(video_v)); | ||
int16_t *PCM = calloc(960, sizeof (*PCM)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the rest of the code we use sizeof(TypeName) instead of sizeof(*var). It might be good to keep it consistent here and in other places (if used differently) as well.
OS X and Windows have small thread stacks by default. Allocating audio and video frames (about 962KB total) on the stack overflows it.
5ff5c1c
to
a45356c
Compare
Reviewed 1 of 1 files at r1. Comments from Reviewable |
Review status: 0 of 1 files reviewed at latest revision, 1 unresolved discussion. auto_tests/toxav_many_test.c, line 165 [r1] (raw file):
|
Review status: 0 of 1 files reviewed at latest revision, 1 unresolved discussion. Comments from Reviewable |
Reviewed 1 of 1 files at r2. Comments from Reviewable |
Review status: all files reviewed at latest revision, 1 unresolved discussion. Comments from Reviewable |
OS X and Windows have small thread stacks by default. Allocating audio and video
frames (about 962KB total) on the stack overflows it.
This change is