自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

小猪爱拱地

勤奋和毅力是通向成功的阶梯

  • 博客(13)
  • 资源 (1)
  • 收藏
  • 关注

转载 Understanding glibc malloc

I always got fascinated by heap memory. Questions such asHow heap memory is obtained from kernel?How efficiently memory is managed?Is it managed by kernel or by library or by application itsel

2017-05-31 22:17:42 657

原创 使用 malloc_trim()

使用 malloc_trim()可把之前分配的内存还给系统。测试代码如下:#include #define NUM_CHUNKS 1000000#define CHUNCK_SIZE 100int main(){ // disable fast bins mallopt(M_MXFAST, 0); void **array = (void **) malloc(sizeof(

2017-05-18 09:04:08 29398 2

原创 交叉编译 util-linux

编的时候,要从https://www.kernel.org/pub/linux/utils/util-linux/下载代码。不要用下面的代码:https://github.com/karelzak/util-linux这个代码编译的时候出现好多错误。。。回到正题。编util-linux的时候要编两次!第一次,在 systemd没有编译的时候先编util-linux,

2017-05-13 09:06:13 5118

原创 pcre3的源代码

1. http://www.pcre.org/2. https://sources.debian.net/src/pcre3/

2017-05-11 02:38:59 795

原创 Linux版本的 sticky note

它是 xpad.安装指令: sudo aptitude install xpad

2017-05-11 01:45:52 640

原创 交叉编译 glib

首先创建文件 arm-linux.cache,内容如下:$ cat arm-linux.cache ac_cv_type_long_long=yesglib_cv_stack_grows=noglib_cv_uscore=noac_cv_func_posix_getpwuid_r=yes然后去掉 write属性:chmod a-w arm-linux.cache之后,执行

2017-05-10 08:01:20 2109

原创 cross-compile dbus

首先要交叉编译expat-2.2.0, 因为 dbus依赖 expat库。之后,执行 configure:./configure --host=arm-linux-gnueabi --prefix=/home/charles/code/build_systemd/_install --disable-systemd --enable-tests=no要先 disable-syste

2017-05-10 07:21:15 1134

原创 交叉编译 systemd(to be continued)

其实需要先编译好好多用的库,比如 attr, caps等,然后才能开始编 systemd.这些细节以后补上。开始编 systemd的时候,先指定 CFLAGS, LDFLAGS:export LDFLAGS="-L/home/charles/code/build_systemd/_install/lib -lattr"export CFLAGS="-I/home/charles/code/

2017-05-09 06:21:20 5248 1

转载 10 Useful “IP” Commands to Configure Network Interfaces

In this post, we are going to review how we can assign Static IP Address,Static Route, Default Gateway etc.  Assigning IP Address on demand usingIP command. IFCONFIG command is deprecated and re

2017-05-07 16:07:15 474

原创 QEMU虚拟机和主机无线网络通讯设置

步骤如下:1. 创建 tap 设备:sudo ip tuntap add dev tap0 mode tap2. enable tap0接口:sudo ip link set tap0 up3. 添加路由:sudo ip route add 192.168.0.10/32 dev tap0或者用旧的命令:sudo route add -host 192.168.

2017-05-07 15:51:58 2085

原创 手动配置 WIFI无线网络 (Ubuntu 16.04)

1. 修改 /etc/network/interfaces,添加无线网卡配置:auto wlan0iface wlan0 inet dhcpwpa-ssid myssidwpa-psk mypassowrddns-nameservers 192.168.0.12.使用  static dns:sudo rm /etc/resolv.conf sudo vi /etc/res

2017-05-04 07:52:15 10899

转载 Disable Network Manager in Ubuntu

https://help.ubuntu.com/community/NetworkManagerThe steps to disable NetworkManager depend on which of the initialization subsystems are running:Upstart or Systemd. Using UpstartAcco

2017-05-04 07:30:51 1705

转载 Adding DNS addresses into /etc/resolv.conf

https://askubuntu.com/questions/627899/nameserver-127-0-1-1-in-resolv-conf-wont-go-awayNetworkManager is the program which (via the resolvconf utility) inserts address127.0.1.1 into resolv.con

2017-05-04 07:08:12 615

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除