This file contains hidden or 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
| #include <stdlib.h> | |
| #include <unistd.h> | |
| int main(int argc, char const *argv[]) { | |
| int n = atoi(argv[1]); | |
| for(int i=0;i<n;i++) { | |
| char *p = malloc(1024*1024); //1MiBメモリ確保 | |
| for(int i=0;i<1024*1024;i+=4096) | |
| p[i] = 111; | |
| } |
This file contains hidden or 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
| #include <stdlib.h> | |
| #include <unistd.h> | |
| int main() { | |
| char *p = malloc(1024*1024*1024); //1GiBメモリ確保 | |
| for(int i=0;i<1024*1024*1024/4096;i++) | |
| p[i] = 111; | |
| exit(0); | |
| } |
This file contains hidden or 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
| #include <stdlib.h> | |
| #include <unistd.h> | |
| int main() { | |
| char *p = malloc(1024*1024*1024); //1GiBメモリ確保 | |
| for(int i=0;i<1024*1024*1024;i+=4096) | |
| p[i] = 111; | |
| exit(0); | |
| } |
This file contains hidden or 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
| #include <stdlib.h> | |
| #include <unistd.h> | |
| int main() { | |
| char *p = malloc(1024*1024*1024); //1GiBメモリ確保 | |
| for(int i=0;i<1024*1024;i++) //最初の1MiBにデータ書き込み | |
| p[i] = 111; | |
| sleep(10000); //観察用にプログラムを止める | |
| exit(0); | |
| } |
This file contains hidden or 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
| $ cargo run | |
| ・・・ | |
| 1秒後 Child: "" | |
| 2秒後 Child: "" | |
| 3秒後 Child: "" | |
| 4秒後 Child: "" | |
| 5秒後 Parent { child: Pid(50794) }: "written" | |
| 5秒後 Child: "" | |
| 6秒後 Parent { child: Pid(50794) }: "written" | |
| 6秒後 Child: "" |
This file contains hidden or 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
| use std::{time, thread}; | |
| use std::sync::{Arc, Mutex}; | |
| use std::time::Instant; | |
| use nix::unistd; | |
| use nix::unistd::ForkResult; //懺悔:これいらなかったです(cargo buildするとワーニング出ます。削ってください。) | |
| fn main() { | |
| let s = Arc::new(Mutex::new(String::new())); //Arcの中のMutexの中の文字列がデータ本体です。 | |
| let s1 = s.clone(); |
This file contains hidden or 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
| export CLICOLOR=1 | |
| export LSCOLORS=DxGxcxdxCxegedabagacad | |
| alias 'ls=ls -G' |
This file contains hidden or 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
| [ -z "$PS1" ] && return | |
| HISTCONTROL=ignoreboth | |
| shopt -s histappend | |
| HISTSIZE=1000 | |
| HISTFILESIZE=2000 | |
| shopt -s checkwinsize | |
| if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then | |
| debian_chroot=$(cat /etc/debian_chroot) |
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>BackgroundAlphaInactive</key> | |
| <real>0.5</real> | |
| <key>BackgroundBlur</key> | |
| <real>0.0</real> | |
| <key>BackgroundBlurInactive</key> | |
| <real>0.48512961647727271</real> |
This file contains hidden or 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
| ### OLD ### | |
| cd /lib/firmware/brcm/ | |
| sudo wget https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm80211/brcm/brcmfmac43430-sdio.bin -O brcmfmac43430-sdio.bin | |
| sudo wget https://github.com/RPi-Distro/firmware-nonfree/raw/master/brcm80211/brcm/brcmfmac43430-sdio.txt -O brcmfmac43430-sdio.txt | |
| sudo reboot | |
| ### NEW ### | |
| cd /lib/firmware/brcm/ |
NewerOlder