博客更新计划
该文档主要阐明后续的博客重点更新方向:
主题 | 进度 | 备注 |
---|---|---|
《二分》 | 规划中 | 二分查找、二分搜索,算法、理论与应用 |
《DFS、BFS》 | 编写中 | 总结DFS、BFS的通用思路,题解举例 |
《动态规划》 | 规划中 | 总结从递归到动态规划、题解 |
wiki & blog
该文档主要阐明后续的博客重点更新方向:
主题 | 进度 | 备注 |
---|---|---|
《二分》 | 规划中 | 二分查找、二分搜索,算法、理论与应用 |
《DFS、BFS》 | 编写中 | 总结DFS、BFS的通用思路,题解举例 |
《动态规划》 | 规划中 | 总结从递归到动态规划、题解 |
Reference
This site is built by Vuepress, Vuepress GitHub
A basic tutorial: zero-to-deploy-build-a-documentation-system-with-vue-and-vuepress
more
注释之前的内容被视为文章摘要。
Zon of Python By Tim Peters
translated by weigao chen
首先对于 Idle 是什么,我知之甚少,所以采用提出疑惑、回答问题的方式先进行行文,进行入门。
cpuidle_idle_call
is a function in the Linux kernel that is responsible for putting the CPU into an idle state when there is no work to do. The function is part of the CPU idle subsystem, which is designed to reduce power consumption by putting the CPU into low-power states when it is not in use.When the
cpuidle_idle_call
function is called, the CPU idle governor selects the most appropriate idle state based on the current system workload and the capabilities of the CPU. The CPU is then put into the selected idle state, which reduces its power consumption while still allowing it to quickly resume normal operation when needed.The
cpuidle_idle_call
function is called by the kernel scheduler when there is no work to do, and it is one of the key components of the Linux kernel's power management system. By efficiently managing CPU power consumption, the kernel can reduce energy usage and extend the battery life of mobile devices.
如果想按照日期来重命名文件夹的话,可以使用如下的方式:
for /f %%a in ('powershell -Command "Get-Date -format yyyyMMdd_HHmm_ss"') do set datetime=%%a
move anr\anr anr\anr_%datetime%
本篇文章首先对 JAVA Art 中的 GC 进行一个全局性的概览,后续如果要研究技术细节等,再另起新的文章进行重点研究。
提示
本篇主要研究 ConcurrentCopying GC 的技术细节。
在 art 虚拟机中,FW Ptr 是一个很重要的概念,通常在 "mark and sweep" phase 中使用。
整个过程的描述大致为,gc collector 扫描存活对象和其引用的对象,确定这些对象应该继续存活还是被回收,在 mark phase 完成以后,gc collector 开始 "sweep" phase, 在这个 phase 中,会回收那些堆中没有被 "mark" 的对象(这些对象不会再被使用了);
Art 的创建过程是一个很复杂的命题,所以我们单独开设一章来对这个过程进行学习。
@todo 增加全局的流程图。
当我们选择了 ART 运行时,Zygote 进程在启动过程中,会调用 libart.so
里面的函数 JNI_CreateVM
来创建一个 art 虚拟机,这个函数的实现如下:
// art/runtime/jni/java_vm_ext.cc
// JNI Invocation interface.
extern "C" jint JNI_CreateJavaVM(JavaVM** p_vm, JNIEnv** p_env, void* vm_args) {
ScopedTrace trace(__FUNCTION__);
const JavaVMInitArgs* args = static_cast<JavaVMInitArgs*>(vm_args);
if (JavaVMExt::IsBadJniVersion(args->version)) {
LOG(ERROR) << "Bad JNI version passed to CreateJavaVM: " << args->version;
return JNI_EVERSION;
}
RuntimeOptions options;
for (int i = 0; i < args->nOptions; ++i) {
JavaVMOption* option = &args->options[i];
options.push_back(std::make_pair(std::string(option->optionString), option->extraInfo));
}
bool ignore_unrecognized = args->ignoreUnrecognized;
if (!Runtime::Create(options, ignore_unrecognized)) {
return JNI_ERR;
}
// Initialize native loader. This step makes sure we have
// everything set up before we start using JNI.
android::InitializeNativeLoader();
Runtime* runtime = Runtime::Current();
bool started = runtime->Start();
if (!started) {
delete Thread::Current()->GetJniEnv();
delete runtime->GetJavaVM();
LOG(WARNING) << "CreateJavaVM failed";
return JNI_ERR;
}
*p_env = Thread::Current()->GetJniEnv();
*p_vm = runtime->GetJavaVM();
return JNI_OK;
}