FreeBSD Bugzilla – Attachment 245854 Details for
Bug 274705
unreasonably large stack reservation for armv7 processes on arm64
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
memory-wasting test program
test.c (text/plain), 511 bytes, created by
Robert Clausecker
on 2023-10-24 22:02:53 UTC
(
hide
)
Description:
memory-wasting test program
Filename:
MIME Type:
Creator:
Robert Clausecker
Created:
2023-10-24 22:02:53 UTC
Size:
511 bytes
patch
obsolete
>#include <stdio.h> >#include <unistd.h> >#include <string.h> >#include <stdlib.h> > >#define BUFSIZ (1UL<<20) >#define NBUF (3UL<<10) > >int main() >{ > size_t i; > volatile char *volatile buf; > > for (i = 0; i < NBUF; i++) { > buf = malloc(BUFSIZ); > if (buf == NULL) { > fprintf(stderr, "malloc failed after %zu buffers\n", i-1); > pause(); > return (EXIT_FAILURE); > } > > memset(buf, 0x55, BUFSIZ); > } > > fprintf(stderr, "%zu buffers of %zu bytes allocated\n", i, (size_t)BUFSIZ); > pause(); > > return (EXIT_SUCCESS); >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 274705
: 245854 |
245855