This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<pre> | |
<?php | |
$megabyte = 1528; // define the max megabytes which should be tested | |
function tryAlloc($megabyte){ | |
echo "try allocating {$megabyte} megabyte..."; | |
$mb = $megabyte; | |
$dummy = str_repeat("-",1048576*$mb); | |
echo "pass."; | |
echo "Usage: " . memory_get_usage(true)/1048576; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Uses xrandr to scale the 15'' 4K internal laptop display by 200% and the 27'' 4K external monitor by 150% without | |
# any blurring. Assumes the laptop is positioned below the monitor. | |
# Replace the output names (e.g "DP-1-3") with your own ones. Use the xrandr command with no arguments to find out | |
# the names. | |
xrandr --output DP-1-3 --scale 1.5x1.5 --mode 3840x2160 --fb 5760x5400 --pos 0x0 && xrandr --output eDP-1-1 --scale 1x1 --pos 1024x3240 |