我有一个巨大的代码传播了多个文件.此代码目前使用普通的malloc.
我想在其中实现Jemalloc以获得更好的性能,我还想使用Jemalloc的内存分析器来了解该代码中每个分配的确切方式和位置.
我试了三个多星期.请帮我.
提前致谢.
我们正在开发移动跟踪应用.对于位置更新,Fused location API以高精度作为优先级使用.
即使屏幕关闭,也需要更新位置.所以,我们正在使用背景Service.背景Service也是部分获取的,WakeLock因此设备不会进入睡眠状态.在后台,Service我们通过挂起的更新请求位置更新Service.
问题是我们只在屏幕打开时接收位置更新.一旦屏幕关闭,位置更新就会停止.还有一个Thread运行的Service任何点都不会被杀死.
屏幕关闭时再次创建位置请求BroadcastReceiver也不起作用.
这是后台Service类(RouteExecution):
private static final String TAG = "RouteExecution";
private static RouteExecution routeExecution = null;
private static GoogleApiClient mGoogleApiClient;
private static PendingIntent pendingIntent = null;
private PowerManager.WakeLock waitLock;
/**
* Creates an IntentService. Invoked by your subclass's constructor.
*/
public RouteExecution() {
super(TAG);
RouteExecution.routeExecution = this;
}
@Override
public void onCreate() {
super.onCreate();
mGoogleApiClient = …Run Code Online (Sandbox Code Playgroud) android location background-service fusedlocationproviderapi android-fusedlocation