4 #include "tests/userprog/boundary.h"
8 /* Returns the beginning of a page. There are at least 2048
9 modifiable bytes on either side of the pointer returned. */
11 get_boundary_area (void)
13 char *p = (char *) ROUND_UP ((uintptr_t) dst, 4096);
19 /* Returns a copy of SRC split across the boundary between two
22 copy_string_across_boundary (const char *src)
24 char *p = get_boundary_area ();
25 p -= strlen (src) < 4096 ? strlen (src) / 2 : 4096;
26 strlcpy (p, src, 4096);