Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8576879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:01:44+00:00 2026-06-11T20:01:44+00:00

GC Malloc is called on every frame when Camera.preview callback is running. I’m assuming

  • 0

GC Malloc is called on every frame when Camera.preview callback is running. I’m assuming that this adds to to slowness of myframe rate.

Does anybody have any advice on ways to reduce these calls. I’ve tried searching on google groups and there does not seem to be many response, so I wanted to get information from people who are building and using camera preview in their applications.

As GC Malloc is being called it seems a new piece of data is being used each time to hold a frame. Can this be predefined? – Is this what callbackwithBuffer does? Ive had trouble getting my head around this and have been unable to implement the callback with buffer properly so any help on how to do this would be appreciated.

Also could someone fully explain what is happen in memory with the frames when camera preview running.

Thanks in advanced.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T20:01:45+00:00Added an answer on June 11, 2026 at 8:01 pm

    The problem you are having is an issue in older versions of android where memory is allocated and garbage collected in short span of time causing performance bottlenecks .

    Explanation can be found here: http://code.google.com/p/android/issues/detail?id=2794

    Your issue can be fixed by using some hidden methods. However you need to expose them by using reflection (the bug link has further examples).

    If I recall correctly this issue has been fixed in Froyo.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this method in an exterior class that gets called whenever the charachter
I've heard rumors that calling malloc leads to so called dirty memory, which you
every time callback function of the audio unit is being called, i get another
I have to implement a wrapper for malloc called mymalloc with the following signature:
When malloc is called, the size is stored adjacent to the allocated block so
glibc's malloc implementation supports 'malloc_trim()' call that lets an application program release unused(ie freed
With Linux/GCC/C++, I'd like to record something to stderr whenever malloc/free/new/delete are called. I'm
I'm reading a C code that do char * buf = malloc(sizeof (char *)
Malloc allocates memory from one of the virtual memory regions of the process called
I need variant of snprint that has guarantee that it never calls malloc. That's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.